HIGH Introduced in 6.15
cxl FwRpc OOB
CVE-2026-89571
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
KernelScan AI6.9MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: cxl/features: bound fwctl command payload to the input buffer fwctl_cmd_rpc() copies cmd->in_len bytes into inbuf = kvzalloc(cmd->in_len) and passes inbuf and in_len to ->fw_rpc(). The CXL callback cxlctl_fw_rpc() ignores in_len and never checks the user-controlled op_size against it. cxlctl_set_feature() bounds op_size only from below (op_size <= sizeof(feat_in->hdr)) and then reads op_size - sizeof(hdr) bytes from feat_in->feat_data via cxl_set_feature(). With a small in_len and a large op_size the first memcpy() already reads past the kvzalloc(in_len) buffer; the out-of-bounds bytes are placed in the mailbox payload and sent to the device, and a large enough op_size can walk into unmapped memory and oops the kernel. The Get paths pin op_size to a fixed size but likewise read the input struct without checking in_len. Reject, at the single dispatch point, any request whose fixed header plus op_size does not fit in the copied-in buffer. The lower-bound test guards the subtraction and ensures op_size was copied in before it is read.
02KernelScan AI Analysis
Risk summary
A local user with access to a CXL firmware-control device can trigger an out-of-bounds heap read by supplying a small input buffer with a large payload size value. The read data is forwarded to the CXL device and can also crash the kernel if it reaches unmapped memory. Only systems with CXL hardware and the fwctl interface enabled are affected.
Vulnerability analysis
The CXL firmware-control interface copies user requests into a kernel buffer, but then trusts a size value embedded inside the request without checking it against the actual buffer boundary. By submitting a small request buffer containing a large internal size value, an attacker can make the kernel read far past the end of the allocated buffer, pulling unrelated heap data into a command that is forwarded to the device. If the size is large enough, the over-read can reach unmapped memory and crash the system. The fix validates that the header plus declared payload size fits within the copied buffer before interpreting the size field. The flaw is reachable by any local user that can open the CXL device, and only affects systems with CXL hardware.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.18 | 6.15 | 6.18.50 | 14d52c15d5d9 |
| 7.2 | 6.15 | 7.2.4 | d8957545fe96 |
| mainline | 6.15 | 7.3 | f687394af983 |