cxl/features: Reject Set Features output buffer smaller than the header
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 Set Features output buffer smaller than the header
cxlctl_set_feature() sizes its output buffer from the user's fwctl_rpc.out_len but never checks it is large enough to hold even the fwctl_rpc_cxl_out header. With out_len == 0 , kvzalloc() returns ZERO_SIZE_PTR, which passes the !rpc_out check, the subsequent rpc_out->size = 0 then writes through the poison pointer.
Reject requests whose output buffer can't hold the response header, before allocating. The Set Feature reply carries no payload, so the header is all that is required.
From the CVE record · Linux
The Linux kernel's CXL Set Features handler does not check whether a requested output buffer can hold the response header. A local caller submitting a request with an output length of zero can cause a write through a poison pointer. The input does not specify whether authentication or further user interaction is required.
Engineers running Linux kernels with the CXL Set Features handler should check their versions against the vendor advisory; affected versions are not specified.