CVE-2026-139326
published high CVSS 3.1 · 8.1bpf: Use the frame mem type in devmap egress XDP
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linuxca9984c5f0ab3690d98b13937b2485a978c8dd73 to < 55a5ecf8531f57f714925b28c1a1bb4601b224c6 · ca9984c5f0ab3690d98b13937b2485a978c8dd73 to < 42a02f01ec4fb8716ce747c3934d925638ff5c44 · ca9984c5f0ab3690d98b13937b2485a978c8dd73 to < f014c65f9de79122e818a977af7261127ee0e98c · ca9984c5f0ab3690d98b13937b2485a978c8dd73 to < b3ca872947ef322c475ceaa7a76a9ebb3356152e · fe068afb868660fe683a8391c6c17ecbe2254922 · a778fbe087c19f4ece5f5fc14173328f070c3803 · 49454f09936a9a96edfb047156889879cb4001eb · 9167d1c274a336e4763eeb3f3f9cb763c55df5aa · 5.15.170 to < 5.16 · 6.1.115 to < 6.2 · 6.6.59 to < 6.7 · 6.11.6 to < 6.12 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.12 (affected) · 0 to < 6.12 (unaffected · semver) · 6.12.120 through 6.12.* (unaffected · semver) · 6.18.65 through 6.18.* (unaffected · semver) · 7.3.6 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Pending Fix; Not Affected | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Pending Fix | Not stated | Amazon Linux assessment |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 8.1 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:N - The trigger is an ordinary jumbo frame received on a page_pool NIC (mlx5, ice, virtio_net). A frags XDP program redirects it through a devmap. The egress program's bpf_xdp_adjust_tail() shrink then reaches bpf_xdp_shrink_data(). The remote sender picks the frame length so the last fragment is no bigger than the trim, and it gets released. AC:H - The attacker can't create the needed setup. An admin must have deployed a devmap egress program that trims frames (bpf_xdp_adjust_tail or bpf_xdp_pull_data) on a jumbo-MTU multi-buffer XDP forwarding path, with a target that supports NDO_XMIT_SG. Once that exists, frame length alone fires the bug. PR:N - The sender needs no account. Loading the XDP programs and creating the devmap require init-namespace CAP_BPF and CAP_NET_ADMIN (bpf_prog_load, map_create), but that is the operator's deployment, not attacker privilege. The cost of needing that deployment is counted in AC:H. UI:N - No user action is needed. bq_xmit_all() runs dev_map_bpf_prog_run() in softirq for every redirected frame. S:U - The page is freed and corrupted inside the same kernel, through page_frag_free() and page_pool recycling. No VM or IOMMU boundary is crossed. C:H - page_frag_free() drops the only page reference of a page_pool page while sibling fragments on it are still in flight. Without check_pages the page goes back to the allocator and is reused while frames and skbs still read it, a page-level use-after-free. I:H - When a sibling fragment is returned, page->pp (which shares space with the free-list pointers) is used as a wild page_pool pointer. If the page was reallocated with refcount 1, it is instead recycled into the pool and the NIC DMAs received packet data into another subsystem's page. A:H - Bad page state taints the kernel. A second free of a refcount-0 page hits VM_BUG_ON_PAGE(page_ref_count==0) (kernel BUG). On teardown the pool waits forever for pages it will never get back.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | ca9984c5f0ab3690d98b13937b2485a978c8dd73 to < 55a5ecf8531f57f714925b28c1a1bb4601b224c6 (affected · git)ca9984c5f0ab3690d98b13937b2485a978c8dd73 to < 42a02f01ec4fb8716ce747c3934d925638ff5c44 (affected · git)ca9984c5f0ab3690d98b13937b2485a978c8dd73 to < f014c65f9de79122e818a977af7261127ee0e98c (affected · git)ca9984c5f0ab3690d98b13937b2485a978c8dd73 to < b3ca872947ef322c475ceaa7a76a9ebb3356152e (affected · git)fe068afb868660fe683a8391c6c17ecbe2254922 (affected · git)a778fbe087c19f4ece5f5fc14173328f070c3803 (affected · git)49454f09936a9a96edfb047156889879cb4001eb (affected · git)9167d1c274a336e4763eeb3f3f9cb763c55df5aa (affected · git)5.15.170 to < 5.16 (affected · semver)6.1.115 to < 6.2 (affected · semver)6.6.59 to < 6.7 (affected · semver)6.11.6 to < 6.12 (affected · semver)Default: unaffected | Linux · cna |
| Linux | Linux | 6.12 (affected)0 to < 6.12 (unaffected · semver)6.12.120 through 6.12.* (unaffected · semver)6.18.65 through 6.18.* (unaffected · semver)7.3.6 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
4Provider assertions
1Linux · cna
bpf: Use the frame mem type in devmap egress XDP
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- fd146df47594b15a05177caf7c4cbc6dc91eddd42a70e8790071c4c58690660f
- Ingested
- 01 Dec 2026, 05:47:22 UTC
- Source record
- Official CVE record