cxl/region: Fix out-of-bounds access in cxl_cancel_auto_attach()
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:
cxl/region: Fix out-of-bounds access in cxl_cancel_auto_attach()
In cxl_cancel_auto_attach(), it assumes cxled->pos is a valid index for accessing p->targets[]. However, cxled->pos can be set to negative errno in cxl_region_sort_targets() if cxl_calc_interleave_pos() fails. This causes the driver to use a negative index to access p->targets[], resulting in out-of-bounds access.
Fix it by walking p->targets[] instead of using cxled->pos directly.
From the CVE record · Linux
The Linux kernel's cxl_cancel_auto_attach() can access p->targets[] out of bounds when an earlier calculation fails and sets cxled->pos to a negative error value. The input does not specify how an attacker could trigger this, or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with CXL region support should check their deployments; affected versions are not specified.