🛡️ CVE-2025-21864 — kernel

🟠 CVSS 7.8 — High ✅ No Known Exploit NVD
7.8
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

tcp: drop secpath at the same time as we currently drop dst

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

tcp: drop secpath at the same time as we currently drop dst

Xiumei reported hitting the WARN in xfrm6_tunnel_net_exit while

running tests that boil down to:

  • create a pair of netns
  • run a basic TCP test over ipcomp6
  • delete the pair of netns

The xfrm_state found on spi_byaddr was not deleted at the time we

delete the netns, because we still have a reference on it. This

lingering reference comes from a secpath (which holds a ref on the

xfrm_state), which is still attached to an skb. This skb is not

leaked, it ends up on sk_receive_queue and then gets defer-free'd by

skb_attempt_defer_free.

The problem happens when we defer freeing an skb (push it on one CPU's

defer_list), and don't flush that list before the netns is deleted. In

that case, we still have a reference on the xfrm_state that we don't

expect at this point.

We already drop the skb's dst in the TCP receive path when it's no

longer needed, so let's also drop the secpath. At this point,

tcp_filter has already called into the LSM hooks that may require the

secpath, so it should not be needed anymore. However, in some of those

places, the MPTCP extension has just been attached to the skb, so we

cannot simply drop all extensions.

How this vulnerability can be exploited

This issue can be reached with local access to the system, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity high, availability high.

Affected software

CVE-2025-21864 is recorded against 2 packages.

  • kernel (from 6.13.0 up to 6.13.5)
  • linux-kernel

Timeline and source

Published on 12 March 2025 and last revised on 12 August 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.

References

cert-portal.siemens.com (Web)
cert-portal.siemens.com (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
git.kernel.org (Web)
lists.debian.org (Web)
github.com (Advisory)
nvd.nist.gov (Advisory)
git.kernel.org (Package)

CVE-2025-21864 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity High
CVSS Score 7.8
CVSS Vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CWE N/A
Public Exploit ✅ No
Source NVD
Published 2025-03-12
Updated 2026-08-20
Modified 2026-08-12

Affected Packages

Software From version Fixed in
kernel 6.13.0 6.13.5
linux-kernel

References

Similar Threats

Site Security Check

Is kernel part of your stack?

CVE-2025-21864 is rated CVSS 7.8 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2025