In the Linux kernel, the following vulnerability has been resolved: accel/qaic: tighten bounds checking in decodemessage() Copy the bounds checking from encodemessage() to decodemessage(). This patch addresses the following concerns. Ensure that there is enough space for at least one header so that we don't have a negative size later. if (msghdrlen < sizeof(*transhdr)) Ensure that we have enough space to read the next header from the msg->data. if (msglen > msghdrlen - sizeof(*transhdr)) return -EINVAL; Check that the transhdr->len is not below the minimum size: if (hdrlen < sizeof(*transhdr)) This minimum check ensures that we don't corrupt memory in decodepassthrough() when we do. memcpy(outtrans->data, intrans->data, len - sizeof(intrans->hdr)); And finally, use sizeadd() to prevent an integer overflow: if (sizeadd(msglen, hdrlen) > msghdr_len)