CVE-2026-139460

PCI/P2PDMA: Do not tear down the allocate attribute on registration failure

No CVSS score yet EPSS 0.21%

Published 30 Nov 2026 Updated 30 Nov 2026 CNA: Linux

Check your servers for CVE-2026-139460

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-139460 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Exploitation

EPSS 0.21%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 11.6% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 7e9c7ef83d785236f5a8c3761dd053fae9b92fb8, before ea24957f8be21b0724fcb968b73860257b718b63
affected from 7e9c7ef83d785236f5a8c3761dd053fae9b92fb8, before 4fea96c997265874cfa1788494f9ce2d413b6d92
affected from 7e9c7ef83d785236f5a8c3761dd053fae9b92fb8, before 29a3a087228b372b9e7ebaf363550e4a1c95ba61
affected from 7e9c7ef83d785236f5a8c3761dd053fae9b92fb8, before 7c4d6505a1f8a1ebe8019b7f988ed494b696653b
Other versions: unaffected
Linux
affected 6.2
unaffected before 6.2
unaffected from 6.12.120 up to and including 6.12.*
unaffected from 6.18.65 up to and including 6.18.*
unaffected from 7.3.6 up to and including 7.3.*
unaffected 7.4-rc1 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-139460 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-139460

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-139460
trivy image --scanners vuln IMAGE | grep CVE-2026-139460

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2026-139460 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.