{"id":"CVE-2026-139455","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2026-11-30T14:19:16.627","lastModified":"2026-11-30T14:19:16.627","vulnStatus":"Received","cveTags":[],"descriptions":[{"lang":"en","value":"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->dev for a switch port and\nport->uport_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->rch, 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."}],"affected":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["drivers/cxl/core/core.h","drivers/cxl/core/pci.c","drivers/cxl/core/port.c","drivers/cxl/core/ras_rch.c","drivers/cxl/cxl.h","drivers/cxl/mem.c","drivers/cxl/pci.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"733b57f262b0e9f05ffeac102fe5bd729e263170","lessThan":"5224ef91eaf0f84cc323e7701d24a1e7748d106c","versionType":"git","status":"affected"},{"version":"733b57f262b0e9f05ffeac102fe5bd729e263170","lessThan":"b72a03ebd9586d59992ecaa6ceed11ea96835734","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["drivers/cxl/core/core.h","drivers/cxl/core/pci.c","drivers/cxl/core/port.c","drivers/cxl/core/ras_rch.c","drivers/cxl/cxl.h","drivers/cxl/mem.c","drivers/cxl/pci.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"6.5","status":"affected"},{"version":"0","lessThan":"6.5","versionType":"semver","status":"unaffected"},{"version":"7.3.6","lessThanOrEqual":"7.3.*","versionType":"semver","status":"unaffected"},{"version":"7.4-rc1","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{},"references":[{"url":"https://git.kernel.org/stable/c/5224ef91eaf0f84cc323e7701d24a1e7748d106c","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/b72a03ebd9586d59992ecaa6ceed11ea96835734","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}]}