accel/qaic: tighten bounds checking in decode_message()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
accel/qaic: tighten bounds checking in decode_message()
Copy the bounds checking from encode_message() to decode_message().
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 (msg_hdr_len < sizeof(*trans_hdr))
Ensure that we have enough space to read the next header from the msg->data.
if (msg_len > msg_hdr_len - sizeof(*trans_hdr)) return -EINVAL;
Check that the trans_hdr->len is not below the minimum size:
From the CVE record · Linux
The Linux kernel's accel/qaic decode_message() lacks bounds checks for message headers and lengths. A malformed message can cause memory corruption in decode_passthrough(); the input does not specify whether exploitation requires local or network access, authentication, or user interaction.
Engineers running the Linux kernel with accel/qaic should check their deployments; affected versions are not specified.