CVE-2026-98368: esp: downgrade zerocopy managed frags before mutating skb frags

Published Oct 6, 2026
·
Updated

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

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    Call skb_zcopy_downgrade_managed() before ESP mutates the skb frag array, including in esp_output_tail() and esp_output_head(), to obtain real references for existing frags and clear SKBFL_MANAGED_FRAG_REFS.

Event History

Oct 6, 2026
CVE Published
via MITRE·08:46 AM
Data Sourced
via MITRE·08:46 AM
Description
Data Sourced
via NVD·09:18 AM
Description

Frequently Asked Questions

1

Which traffic path is exposed to this issue?

The issue is in the ESP out-of-place output path, where esp->inplace is false, and applies when the skb contains zerocopy managed fragments marked SKBFL_MANAGED_FRAG_REFS.

2

What are the operational consequences if the affected path is used?

The source scatterlist cleanup can drop references to ubuf-owned pinned payload pages, causing a use-after-free while those pages remain pinned. The path can also leak the ESP destination x->xfrag page for each packet processed.

3

Is the in-place ESP output path identified as affected?

The provided information specifically identifies the out-of-place path. It does not identify the path where esp->inplace is true as affected.

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