cxl/region: Block region delete during region creation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
cxl/region: Block region delete during region creation
Expand the range lock, rename it "regions_lock", to disable region deletion in the critical period between construct_region() and attach_target(), as well as the period between device_add() and registering the remove actions.
Otherwise, userspace can confuse the kernel. It can violate the assumption the region stays registered through the completion of cxl_add_to_region(). It can violate the assumption that devm_add_action_or_reset() is working with a live 'struct cxl_region'.
It is ok for the region to disappear outside of those windows as that mirrors device hotplug flows where the proper locks are held.
From the CVE record · Linux
The Linux kernel’s cxl/region code can allow a region to be deleted during critical parts of region creation. Local userspace interaction can then violate kernel assumptions that the region remains registered and its structure remains live. The input does not specify authentication requirements.
Engineers running Linux kernels with cxl/region support should check their versions against the vendor advisory; affected versions are not specified.