CVE-2026-139460: Linux kernel · PCI/P2PDMA: Do not tear down the allocate attribute on registration failure
Affects Linux kernelSource CVE Database V5
Not known to be exploited · fixed in ea24957f8be21b0724fcb968b73860257b718b63 : update Linux kernel when convenient.
Data as of 30 Nov 2026, 14:00 UTC
Rated by Threat Radar · CVSS not yet scored by NVD
Thin evidence
One scorer or none- Patch
- Available – fixed in ea24957f8be21b0724fcb968b73860257b718b63, 29a3a087228b372b9e7ebaf363550e4a1c95ba61, 7c4d6505a1f8a1ebe8019b7f988ed494b696653b +1
Exploitation evidence
Disclosed: evidence found.
CVE published 30 Nov 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Nov 2026.
What to do
Upgrade Linux kernel to ea24957f8be21b0724fcb968b73860257b718b63, 29a3a087228b372b9e7ebaf363550e4a1c95ba61, 7c4d6505a1f8a1ebe8019b7f988ed494b696653b or 4fea96c997265874cfa1788494f9ce2d413b6d92.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| LinuxLinux | Affected
| Fixed in
|
| LinuxLinux | Affected
| Fixed in
|
| LinuxLinux | Affected
| Fixed in
|
| LinuxLinux | Affected
| Fixed in
|
| LinuxLinux | Affected
| Fixed in– |
Description
In the Linux kernel, the following vulnerability has been resolved: PCI/P2PDMA: Do not tear down the allocate attribute on registration failure pci_p2pdma_add_resource() installs pci_p2pdma_unmap_mappings() as a devres action with the devres allocated p2p_pgmap as its data, and only then adds the range to the pool: error = devm_add_action_or_reset(&pdev->dev, pci_p2pdma_unmap_mappings, p2p_pgmap); if (error) goto pages_free; p2pdma = rcu_dereference_protected(pdev->p2pdma, 1); error = gen_pool_add_owner(p2pdma->pool, ...); if (error) goto pages_free; The action removes the allocate attribute for the whole device, which tears down existing userspace mappings of every BAR already registered on it. Both failures here get that wrong, in opposite ways. devm_add_action_or_reset() runs the action when it cannot allocate its devres node, so an -ENOMEM while registering a second BAR unmaps the first one. Use devm_add_action() and let the error path unwind only what this call created. gen_pool_add_owner() allocates a chunk and can also fail with -ENOMEM. There the action is registered, and the error path frees p2p_pgmap with devm_kfree() while leaving the action pointing at it. On unbind devres runs the action and pci_p2pdma_unmap_mappings() dereferences p2p_pgmap->mem->owner->kobj, which is freed memory. Give that failure its own label and drop the action with devm_remove_action(), which removes it without running it.
References
- git.kernel.org/stable/c/ea24957f8be21b0724fcb968b73860257b718b63 (opens in a new tab)
- git.kernel.org/stable/c/4fea96c997265874cfa1788494f9ce2d413b6d92 (opens in a new tab)
- git.kernel.org/stable/c/29a3a087228b372b9e7ebaf363550e4a1c95ba61 (opens in a new tab)
- git.kernel.org/stable/c/7c4d6505a1f8a1ebe8019b7f988ed494b696653b (opens in a new tab)