UBUNTU-CVE-2026-98368: Use After Free
In the Linux kernel, the following vulnerability has been resolved: esp: downgrade zerocopy managed frags before mutating skb frags On the out-of-place output path (esp->inplace == false) ESP rewrites the skb frag array: espoutputhead() appends a trailer frag and espoutputtail() replaces the frags with a destination page, both referenced with getpage(). When the skb carries zerocopy managed frags (SKBFLMANAGEDFRAGREFS) the payload frags are owned by the ubuf and must not be referenced or unreferenced individually, but ESP mutates the frag array without ever downgrading the skb. This breaks the managed-frag invariant two ways: - espssgunref() walks the source scatterlist and drops a page reference for every frag, including the ubuf-owned payload frags, pushing their refcount below the GUP pin bias while the pages are still pinned, i.e. a use-after-free of the zerocopy pages; - espoutputtail() installs its destination page as frag 0 with getpage() but leaves SKBFLMANAGEDFRAGREFS set, so skbreleasedata() takes the skipunref branch and never drops that reference, leaking the x->xfrag page at packet rate. Fix this the way every other frag-mutating site does (ipappenddata(), ip6appenddata(), tcpsendmsglocked()) and call skbzcopydowngrademanaged() before ESP touches the frag array: it takes a real reference on each existing frag and clears SKBFLMANAGEDFRAGREFS, so the per-frag unref in espssgunref() and the frag release in skbreleasedata() are both balanced and no mixed-ownership frag array is left behind.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1 - Compensating control
On the ESP out-of-place output path, call skb_zcopy_downgrade_managed() before ESP mutates the skb frag array, including before esp_output_head() appends a trailer frag or esp_output_tail() replaces the frags with a destination page.
Event History
Frequently Asked Questions
What conditions are required to trigger this issue?
The vulnerable path requires ESP to use the out-of-place output path, where esp->inplace is false, and to process an skb containing zerocopy managed fragments marked SKBFL_MANAGED_FRAG_REFS. Exploitation also requires local access with low privileges, as reflected by the supplied attack vector and privileges required.
What are the likely effects if the vulnerable path is reached?
Incorrect handling of ubuf-owned zerocopy payload fragments can drop page references below the GUP pin bias while pages remain pinned, creating a use-after-free condition. The same path can also leak the ESP destination xfrag page at packet rate because its reference is not released.
Which Ubuntu kernel package families are identified as affected?
The listed software includes ubuntu/linux-riscv, ubuntu/linux-realtime, ubuntu/linux-azure, ubuntu/linux-gcp, ubuntu/linux-azure-fde, ubuntu/linux-gke, ubuntu/linux-hwe-edge, and ubuntu/linux-gkeop.