cxl/features: Clamp Get Feature output size to the remaining 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: Clamp Get Feature output size to the remaining buffer
cxl_get_feature() reads a feature in a loop but passes a fixed size_out as the output capacity every iteration. On the last partial iteration the buffer has less room left, so a device that returns more than asked can overflow feat_out.
Use the per-iter size data_to_rd_size, which already tracks the remaining room, as the output capacity.
From the CVE record · Linux
The Linux kernel's cxl_get_feature() passes a fixed output capacity on every iteration, even when less buffer space remains. On the final partial iteration, a device that returns more data than requested can overflow feat_out. The input does not specify whether this can be triggered over a network, requires authentication, or involves user interaction.
Engineers running the Linux kernel should check whether their version is affected; affected versions are not specified.