cxl/pmem: Fix cxl_pmem_region and cxl_memdev leak
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/pmem: Fix cxl_pmem_region and cxl_memdev leak
When a cxl_nvdimm object goes through a ->remove() event (device physically removed, nvdimm-bridge disabled, or nvdimm device disabled), then any associated regions must also be disabled. As highlighted by the cxl-create-region.sh test [1], a single device may host multiple regions, but the driver was only tracking one region at a time. This leads to a situation where only the last enabled region per nvdimm device is cleaned up properly. Other regions are leaked, and this also causes cxl_memdev reference leaks.
Fix the tracking by allowing cxl_nvdimm objects to track multiple region associations.
From the CVE record · Linux
The Linux kernel’s cxl/pmem driver tracked only one region per cxl_nvdimm device, even when a device hosted multiple regions. When the device is removed or disabled, earlier regions may remain enabled, leaking region objects and cxl_memdev references. The input does not describe an attacker, access requirements, or user interaction.
Engineers running Linux kernels with cxl/pmem and cxl_nvdimm devices should check their deployments; affected versions are not specified.