CVE-2026-139326
bpf: Use the frame mem type in devmap egress XDP
Check your servers for CVE-2026-139326
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-139326 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.
Description
In the Linux kernel, the following vulnerability has been resolved:
bpf: Use the frame mem type in devmap egress XDP
A devmap egress program that removes a whole fragment of a redirected xdp_frame with bpf_xdp_adjust_tail() or bpf_xdp_pull_data() frees it with page_frag_free() whatever the frame's memory type is. For a MEM_TYPE_PAGE_POOL frame from a page_pool based driver this drops the page reference owned by the pool while the pool still accounts the fragment ("page_pool leak" bad page, leaked pp reference).
kernel/bpf/devmap.c:dev_map_bpf_prog_run() points xdp.rxq at an on-stack
struct xdp_rxq_info rxq = { .dev = rx_dev };
whose mem.type is 0, i.e. MEM_TYPE_PAGE_SHARED, and net/core/filter.c:bpf_xdp_shrink_data() releases frags according to rxq->mem.type. cpumap, which runs programs on xdp_frames the same way, already copies xdpf->mem_type into its private rxq for each frame.
With 9000 byte frames from virtio_net and an egress program that cuts the fragments off:
BUG: Bad page state in process swapper/3 pfn:10660b page dumped because: page_pool leak bad_page+0xbd/0x190 __free_frozen_pages+0x5c7/0x900 bpf_xdp_adjust_tail+0x3be/0x480 bpf_prog_dad43f894a3faff7_egress+0x15c/0x1cd dev_map_bpf_prog_run+0x288/0x610
The pool waits for these pages for ever when its device is gone. That is the harmless case. A page of the pool can hold more than one fragment while its refcount is 1: the first page_frag_free() frees it under the fragment which is still in use, and the second one runs into
page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0) kernel BUG at include/linux/mm.h:1846!
veth is not affected. It takes references of its own on the pages and redirects the frame as MEM_TYPE_PAGE_SHARED.
Fix by setting rxq.mem.type from each frame before running the devmap program, as cpu_map_bpf_prog_run_xdp() does.
Severity (CVSS)
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.57%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 48.3% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from ca9984c5f0ab3690d98b13937b2485a978c8dd73, before 55a5ecf8531f57f714925b28c1a1bb4601b224c6 affected from ca9984c5f0ab3690d98b13937b2485a978c8dd73, before 42a02f01ec4fb8716ce747c3934d925638ff5c44 affected from ca9984c5f0ab3690d98b13937b2485a978c8dd73, before f014c65f9de79122e818a977af7261127ee0e98c affected from ca9984c5f0ab3690d98b13937b2485a978c8dd73, before b3ca872947ef322c475ceaa7a76a9ebb3356152e affected fe068afb868660fe683a8391c6c17ecbe2254922 affected a778fbe087c19f4ece5f5fc14173328f070c3803 affected 49454f09936a9a96edfb047156889879cb4001eb affected 9167d1c274a336e4763eeb3f3f9cb763c55df5aa affected from 5.15.170, before 5.16 affected from 6.1.115, before 6.2 affected from 6.6.59, before 6.7 affected from 6.11.6, before 6.12
Other versions: unaffected
|
| Linux |
affected 6.12 unaffected before 6.12 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-139326 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-139326
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-139326
trivy image --scanners vuln IMAGE | grep CVE-2026-139326
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
- https://git.kernel.org/stable/c/55a5ecf8531f57f714925b28c1a1bb4601b224c6 git.kernel.org
- https://git.kernel.org/stable/c/42a02f01ec4fb8716ce747c3934d925638ff5c44 git.kernel.org
- https://git.kernel.org/stable/c/f014c65f9de79122e818a977af7261127ee0e98c git.kernel.org
- https://git.kernel.org/stable/c/b3ca872947ef322c475ceaa7a76a9ebb3356152e git.kernel.org
Source: the record CVE-2026-139326 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.
Vulnpocalypse