CVE-2026-139326: bpf: Use the frame mem type in devmap egress XDP

Published Nov 30, 2026
·
Updated

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 xdpframe with bpfxdpadjusttail() or bpfxdppulldata() frees it with pagefragfree() whatever the frame's memory type is. For a MEMTYPEPAGEPOOL frame from a pagepool based driver this drops the page reference owned by the pool while the pool still accounts the fragment ("pagepool leak" bad page, leaked pp reference).

kernel/bpf/devmap.c:devmapbpfprogrun() points xdp.rxq at an on-stack

struct xdprxqinfo rxq = { .dev = rxdev };

whose mem.type is 0, i.e. MEMTYPEPAGESHARED, and net/core/filter.c:bpfxdpshrinkdata() releases frags according to rxq->mem.type. cpumap, which runs programs on xdpframes the same way, already copies xdpf->memtype into its private rxq for each frame.

With 9000 byte frames from virtionet and an egress program that cuts the fragments off:

BUG: Bad page state in process swapper/3 pfn:10660b page dumped because: pagepool leak badpage+0xbd/0x190 freefrozenpages+0x5c7/0x900 bpfxdpadjusttail+0x3be/0x480 bpfprogdad43f894a3faff7egress+0x15c/0x1cd devmapbpfprogrun+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 pagefragfree() frees it under the fragment which is still in use, and the second one runs into

page dumped because: VMBUGONPAGE(pagerefcount(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 MEMTYPEPAGESHARED.

Fix by setting rxq.mem.type from each frame before running the devmap program, as cpumapbpfprogrunxdp() does.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Set rxq.mem.type from each frame before running the devmap program.

    Linux kernel devmap egress XDP rxq.mem.type = xdpf->mem_type

Event History

Nov 30, 2026
CVE Published
via MITRE·01:33 PM
Data Sourced
via MITRE·01:33 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203