Database/Kernel, userspace & hypervisor
Linux kernel CXL core: use-after-free on the parent port when a memdev is detached
Impact
When a CXL memdev or any ancestor port is removed, delete_endpoint() locks the endpoint's parent without holding a reference to it, so the parent can be freed first - the reported trace is a bad-spinlock-magic splat in __mutex_lock() from the cxl_port detach_memdev worker, a use-after-free on freed device memory. A second bug picks the wrong parent device on RCH topologies. For operators running CXL memory expanders or pooled memory behind GPU nodes, this is a host crash on memory hot-remove, which is the one operation CXL pooling exists to perform; it is triggered by topology teardown rather than by tenant activity, so the exposure is to the operator's own maintenance workflow, not to an attacker.
Who can reach it
Local and administrative: requires CXL hardware with the cxl_port/cxl_mem drivers bound and a memdev or port removal (hot-remove, driver unbind). Not reachable by an unprivileged tenant and not reachable on hosts without CXL devices.
What to do
Patch the kernel to a stable release containing the linked commits, which take a reference on the parent and use endpoint->dev.parent for RCH topologies, then reboot each node. Until then, avoid CXL memdev and port hot-remove on production hosts. The record lists stable commits with no named fixed release.
References
Related entries
- Intel CPU (Native BHI): Native Branch History Injection - unprivileged user leaks kernel memory despite eIBRSCVE-2024-2201 · Intel CPU (Native BHI)Medium
- Linux kernel (drivers/vfio/pci): A failed interrupt-context allocation while enabling INTx leaks the IRQ name string.CVE-2024-38632 · Linux kernel (drivers/vfio/pci)Medium
- Intel ice NIC driver: external timestamp interrupt after PTP release panics the hostCVE-2024-42107 · Linux kernel ice driver (PTP external timestamp handling after PTP release)Medium
- Linux kernel nvme-pci: reset racing controller disable passes bad queue counts to blk-mqCVE-2024-50135 · Linux kernel nvme-pci (nvme_pci_update_nr_queues vs nvme_dev_disable race)Medium
- Linux kernel (drivers/iommu): Removing a device from the per-IOMMU page-fault queue responds to outstanding faults butCVE-2025-21770 · Linux kernel (drivers/iommu)Medium
- Linux kernel (drivers/pci/controller): The Intel VMD driver guarded config-space access with a lock type that becomes aCVE-2025-23161 · Linux kernel (drivers/pci/controller)Medium
This entry is curated: imported from vendor advisories with machine assistance, not yet individually verified. Confirm against your vendor's advisory before acting, and report anything wrong.