CVE-2024-26921: inet: inet_defrag: prevent sk release while still in use

Published Apr 18, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

inet: inetdefrag: prevent sk release while still in use

iplocalout() and other functions can pass skb->sk as function argument.

If the skb is a fragment and reassembly happens before such function call returns, the sk must not be released.

This affects skb fragments reassembled via netfilter or similar modules, e.g. openvswitch or ctact.c, when run as part of tx pipeline.

Eric Dumazet made an initial analysis of this bug. Quoting Eric: Calling ipdefrag() in output path is also implying skborphan(), which is buggy because output path relies on sk not disappearing.

A relevant old patch about the issue was : 8282f27449bf ("inet: frag: Always orphan skbs inside ipdefrag()")

[..]

net/ipv4/ipoutput.c depends on skb->sk being set, and probably to an inet socket, not an arbitrary one.

If we orphan the packet in ipvlan, then downstream things like FQ packet scheduler will not work properly.

We need to change ipdefrag() to only use skborphan() when really needed, ie whenever fraglist is going to be used.

Eric suggested to stash sk in fragment queue and made an initial patch. However there is a problem with this:

If skb is refragmented again right after, ipdofragment() will copy head->sk to the new fragments, and sets up destructor to sockwfree. IOW, we have no choice but to fix up skwmem accouting to reflect the fully reassembled skb, else wmem will underflow.

This change moves the orphan down into the core, to last possible moment. As ipdefragoffset is aliased with skbuff->sk member, we must move the offset into the FRAGCB, else skb->sk gets clobbered.

This allows to delay the orphaning long enough to learn if the skb has to be queued or if the skb is completing the reasm queue.

In the former case, things work as before, skb is orphaned. This is safe because skb gets queued/stolen and won't continue past reasm engine.

In the latter case, we will steal the skb->sk reference, reattach it to the head skb, and fix up wmem accouting when inetfrag inflates truesize.

Other sources

In the Linux kernel, the following vulnerability has been resolved:

inet: inetdefrag: prevent sk release while still in use

The Linux kernel CVE team has assigned CVE-2024-26921 to this issue.

Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024041819-CVE-2024-26921-e3b3@gregkh/T

Red Hat

Linux Kernel is vulnerable to a denial of service, caused by a buffer underflow when skb fragments reassembled via netfilter or similar modules. By sending a specially crafted request, a local authenticated attacker could exploit this vulnerability to cause a denial of service condition.

IBM

Affected Software

16 affected componentsFixes available
IBM Security Verify Governance<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Software Stack<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Virtual Appliance<=ISVG 10.0.2
IBM Security Verify Governance Identity Manager Container<=ISVG 10.0.2
debian/linux<=5.10.223-1
5.10.234-16.1.129-16.1.135-16.12.22-16.12.25-1
redhat/kernel<6.1.85
6.1.85
redhat/kernel<6.6.26
6.6.26
redhat/kernel<6.8.5
6.8.5
redhat/kernel<6.9
6.9
Linux Linux kernel>=4.1<5.4.285
Linux Linux kernel>=5.5<5.10.227
Linux Linux kernel>=5.11<5.15.168
Linux Linux kernel>=5.16<6.1.85
Linux Linux kernel>=6.2<6.6.26
Linux Linux kernel>=6.7<6.8.5
Linux Linux kernel=6.9-rc1

Event History

Apr 18, 2024
CVE Published
via MITRE·09:47 AM
Data Sourced
via MITRE·09:47 AM
Description
Data Sourced
via NVD·10:15 AM
Description
Data Sourced
via NVD·10:15 AM
RemedySeverityAffected Software
Data Sourced
via Red Hat·01:50 PM
DescriptionSeverityAffected Software
Jul 11, 2024
Data Sourced
via Launchpad·07:45 PM
Description
Apr 17, 2025
Data Sourced
12:00 AM
SeverityWeakness
Apr 27, 2025
Data Sourced
via Ubuntu·12:15 AM
RemedyDescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-26921?

The severity of CVE-2024-26921 is classified as moderate, indicating a potential impact on system stability.

2

How do I fix CVE-2024-26921?

To fix CVE-2024-26921, users should update their Linux kernel to versions 6.1.85, 6.6.26, 6.8.5, or 6.9 according to their distribution.

3

What systems are affected by CVE-2024-26921?

CVE-2024-26921 affects various versions of the Linux kernel as provided by Red Hat and Debian distributions.

4

What is the nature of the vulnerability in CVE-2024-26921?

CVE-2024-26921 is related to improper handling of socket buffer integrity during packet processing in the Linux kernel.

5

When was CVE-2024-26921 published?

CVE-2024-26921 was published on February 6, 2024.

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