AZL-117154: CVE-2026-139455 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
cxl/core: Hold the dport host lock across dport lookup and use
Callers of cxlpcifindport() and cxlmemfindport() can be handed a 'struct cxldport' that is already freed, and all four dereference it without the lock that would prevent that.
A dport is kzalloc()'d into a devres group on its host device, so it dies when that host unbinds. The host is &port->dev for a switch port and port->uportdev for the root port.
Both helpers return the dport through an output parameter. The caller's port reference pins struct cxlport, not the dport allocation, and the lookup itself is a bare xaload() under no lock.
Add cxlportdporthost() to name the device that pins a dport, and cxlpcifinddport() / cxlmemfinddport() to look one up with that device's lock held and asserted. Convert the four callers to use them and bail if the dport is gone. cxlportadddport() already follows this rule.
cxlmemprobe() chose its endpoint devm host from dport->rch, which meant dereferencing the dport before taking any lock. Use cxlportdporthost(): rch dports only ever land on the root port, so it selects the same device without needing the dport.
With every caller converted, the dport output parameter of cxlpcifindport() and cxlmemfindport() is unused. Drop it.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In Linux kernel CXL core, convert the four callers to use cxl_pci_find_dport()/cxl_mem_find_dport() with the dport host’s lock held across lookup and use; bail out if the dport is gone. Use cxl_port_dport_host() to identify the host device.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems using the affected Azure Linux kernel package with CXL support are exposed when CXL ports or their host devices can be unbound while code is looking up and using CXL dports. The issue involves CXL PCI and CXL memory dport lookup paths.
What condition is required to trigger the vulnerability?
A CXL dport must be freed as its host device unbinds while a caller performs an unlocked dport lookup or dereferences the returned dport. The affected callers previously pinned the CXL port, but that reference did not pin the dport allocation.
How does the fix prevent the race?
The fix holds the dport host device lock across lookup and use, and updates callers to bail out when the dport is no longer present. It also uses a helper to identify the device that pins a dport before accessing it.