AZL-117151: CVE-2026-139454 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
cxl/port: Attach endpoints to a dport under the lock that pins it
devmcxlenumerateports() and addportattachep() look up or create a dport under its port's device lock, drop the lock, then pass the dport to cxladdep(). addep() reads dport->port before taking the lock, and cxlgpfportsetup() reads and writes the dport with no lock held.
A concurrent cxldetachep() for another memdev below the same port can free the dport in that window: it calls deldports() 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 addep() 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. ]
Affected Software
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Systems using the Azure Linux kernel package version 6.6.161.1-1 are affected. The race involves CXL port endpoint enumeration and requires multiple memory devices beneath the same port.
What activity triggers the vulnerable race?
One memory device must be enumerating or attaching an endpoint while another memory device under the same port concurrently detaches its endpoint. If the detaching device is the last endpoint, it can remove and free the shared dport while enumeration still uses it, causing a freed-memory dereference.
What synchronization change resolves the race?
The resolved implementation keeps the port device lock held while attaching the endpoint and performing GPF setup. This ensures that a dport found in the port's dport collection remains live until the lock is released.