cxl/port: Attach endpoints to a dport under the lock that pins it
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| LinuxLinux | — | Not listed |
| LinuxKernel |
≥ 6.0.0, < 6.18.66→ 6.18.66 ≥ 6.19.0, < 7.3.6→ 7.3.6 |
6.18.66 7.3.6 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- Debian DEBIAN-CVE-2026-139454 linux Fix available
- Ubuntu UBUNTU-CVE-2026-139454 linux-xilinx-zynqmp, linux-xilinx, linux-vmware +166 more No fixed version in this record
Original description The description as published by the source.
In the Linux kernel, the following vulnerability has been resolved:
cxl/port: Attach endpoints to a dport under the lock that pins it
devm_cxl_enumerate_ports() and add_port_attach_ep() look up or create a
dport under its port's device lock, drop the lock, then pass the dport
to cxl_add_ep(). add_ep() reads dport->port before taking the lock, and
cxl_gpf_port_setup() reads and writes the dport with no lock held.
A concurrent cxl_detach_ep() for another memdev below the same port can
free the dport in that window: it calls del_dports() under the port lock
when the last endpoint leaves. The enumerating memdev then dereferences
freed memory.
Attach the endpoint and set up GPF while the port lock from the lookup
is still held. Make add_ep() assert that lock instead of taking it.
Under the lock, a dport found in port->dports is still live, since
removal erases it from the xarray before freeing it.
[ dj: Added kdoc update from Alison. ]
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory nvd.nist.gov
- package git.kernel.org
- REDHAT Red Hat
- web git.kernel.org
- web git.kernel.org
- web git.kernel.org
- web github.com