# CVE-2025-21864: tcp: drop secpath at the same time as we currently drop dst

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.34% (percentile 20, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-03-12T09:42:21.223Z
- **Modified:** 2026-11-10T13:17:37.757Z

## Who should check

- Anyone running Linux \>= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \< 87858bbf21da239ace300d61dd209907995c0491; \>= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \< f1d5e6a5e468308af7759cf5276779d3155c5e98; \>= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \< cd34a07f744451e2ecf9005bb7d24d0b2fb83656; \>= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \< 69cafd9413084cd5012cf5d7c7ec6f3d493726d9; \>= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \< 9b6412e6979f6f9e0632075f8f008937b5cd4efd
- Anyone running Linux 5.19

## Description

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.

## Affected and fixed versions

- Linux: \>= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \< 87858bbf21da239ace300d61dd209907995c0491; \>= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \< f1d5e6a5e468308af7759cf5276779d3155c5e98; \>= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \< cd34a07f744451e2ecf9005bb7d24d0b2fb83656; \>= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \< 69cafd9413084cd5012cf5d7c7ec6f3d493726d9; \>= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \< 9b6412e6979f6f9e0632075f8f008937b5cd4efd (cvelist)
- Linux: 5.19 (cvelist)

## Mitigation

- Upgrade Linux to 9b6412e6979f6f9e0632075f8f008937b5cd4efd or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-21864. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-21864.md
Affected: Linux >= 68822bdf76f10c3dc80609d4e2cdc1e847429086, < 87858bbf21da239ace300d61dd209907995c0491; >= 68822bdf76f10c3dc80609d4e2cdc1e847429086, < f1d5e6a5e468308af7759cf5276779d3155c5e98; >= 68822bdf76f10c3dc80609d4e2cdc1e847429086, < cd34a07f744451e2ecf9005bb7d24d0b2fb83656; >= 68822bdf76f10c3dc80609d…
Fixed in: Linux 87858bbf21da239ace300d61dd209907995c0491, Linux 69cafd9413084cd5012cf5d7c7ec6f3d493726d9, Linux 9b6412e6979f6f9e0632075f8f008937b5cd4efd

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-21864 being exploited?

There is no confirmed exploitation: CVE-2025-21864 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.34% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-21864?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-21864?

Linux \>= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \< 87858bbf21da239ace300d61dd209907995c0491; \>= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \< f1d5e6a5e468308af7759cf5276779d3155c5e98; \>= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \< cd34a07f744451e2ecf9005bb7d24d0b2fb83656; \>= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \< 69cafd9413084cd5012cf5d7c7ec6f3d493726d9; \>= 68822bdf76f10c3dc80609d4e2cdc1e847429086, \< 9b6412e6979f6f9e0632075f8f008937b5cd4efd; Linux 5.19.

### Is there a fix for CVE-2025-21864?

Yes. Fixed in Linux 87858bbf21da239ace300d61dd209907995c0491, Linux 69cafd9413084cd5012cf5d7c7ec6f3d493726d9, Linux 9b6412e6979f6f9e0632075f8f008937b5cd4efd. Upgrade Linux to 9b6412e6979f6f9e0632075f8f008937b5cd4efd or later.

### How do I check if I'm affected by CVE-2025-21864?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/87858bbf21da239ace300d61dd209907995c0491>
- patch: <https://git.kernel.org/stable/c/f1d5e6a5e468308af7759cf5276779d3155c5e98>
- patch: <https://git.kernel.org/stable/c/cd34a07f744451e2ecf9005bb7d24d0b2fb83656>
- patch: <https://git.kernel.org/stable/c/69cafd9413084cd5012cf5d7c7ec6f3d493726d9>
- patch: <https://git.kernel.org/stable/c/9b6412e6979f6f9e0632075f8f008937b5cd4efd>
- other: <https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-457936.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-784472.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-21864>

HTML: <https://flawdb.com/CVE-2025-21864> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-21864>
