{"id":"CVE-2026-139455","summary":"cxl/core: Hold the dport host lock across dport lookup and use","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ncxl/core: Hold the dport host lock across dport lookup and use\n\nCallers of cxl_pci_find_port() and cxl_mem_find_port() can be handed a\n'struct cxl_dport' that is already freed, and all four dereference it\nwithout the lock that would prevent that.\n\nA dport is kzalloc()'d into a devres group on its host device, so it dies\nwhen that host unbinds. The host is &port-\u003edev for a switch port and\nport-\u003euport_dev for the root port.\n\nBoth helpers return the dport through an output parameter. The caller's\nport reference pins struct cxl_port, not the dport allocation, and the\nlookup itself is a bare xa_load() under no lock.\n\nAdd cxl_port_dport_host() to name the device that pins a dport, and\ncxl_pci_find_dport() / cxl_mem_find_dport() to look one up with that\ndevice's lock held and asserted. Convert the four callers to use them and\nbail if the dport is gone. cxl_port_add_dport() already follows this rule.\n\ncxl_mem_probe() chose its endpoint devm host from dport-\u003erch, which meant\ndereferencing the dport before taking any lock. Use cxl_port_dport_host():\nrch dports only ever land on the root port, so it selects the same device\nwithout needing the dport.\n\nWith every caller converted, the dport output parameter of\ncxl_pci_find_port() and cxl_mem_find_port() is unused. Drop it.","modified":"2026-11-30T15:02:28.553375Z","published":"2026-11-30T13:34:54.855Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139455.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/5224ef91eaf0f84cc323e7701d24a1e7748d106c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b72a03ebd9586d59992ecaa6ceed11ea96835734"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139455.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139455"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"733b57f262b0e9f05ffeac102fe5bd729e263170"},{"fixed":"5224ef91eaf0f84cc323e7701d24a1e7748d106c"},{"fixed":"b72a03ebd9586d59992ecaa6ceed11ea96835734"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139455.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.5.0"},{"fixed":"7.3.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139455.json"}}],"schema_version":"1.9.2"}