cxl/features: Reject Get Feature count larger than the output buffer
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 |
|
|
6.18.527.2.67.3In the Linux kernel, the following vulnerability has been resolved:
cxl/features: Reject Get Feature count larger than the output buffer
cxlctl_get_feature() sizes its output buffer from the user's fwctl_rpc.out_len, but the device is told to write cxl_mbox_get_feat_in.count bytes into rpc_out->payload, which is a separate user-controlled value. Nothing bounds count against out_len, so a small out_len with a large count overflows the kvzalloc()'d buffer. A heap OOB write reachable from FWCTL_RPC.
Reject requests where count exceeds the available payload room, before allocating.
From the CVE record · Linux
The Linux kernel’s cxlctl_get_feature() does not check whether a device’s requested write count fits the allocated output buffer. A local caller able to submit FWCTL_RPC requests can supply a small output length and a larger count, causing a heap out-of-bounds write. No further user interaction is described.
Operators running the Linux kernel should check whether their kernel includes the affected cxl/features code; affected versions are not specified.