CVE-2025-21864
tcp: drop secpath at the same time as we currently drop dst
Reported by linux · Published March 12, 2025
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel-devel | Amazon Linux | 6.1.130-139.222.amzn2023 |
| perf | Amazon Linux | 6.1.130-139.222.amzn2023 |
| kernel-livepatch-6.1.130-139.222 | Amazon Linux | 1.0-0.amzn2023 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 68822bdf76f10c3dc80609d4e2cdc1e847429086, 68822bdf76f10c3dc80609d4e2cdc1e847429086, 68822bdf76f10c3dc80609d4e2cdc1e847429086 |
| Linux | Linux | 5.19, 0, 6.1.130 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | perf | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) | 3.1.6, 3.1.7, 3.1.5 |
| amazon:2023 | kernel-livepatch-6.1.130-139.222 | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) | 3.1.5, 3.1.6, 3.1.7 |
| Linux | Linux | 68822bdf76f10c3dc80609d4e2cdc1e847429086, 68822bdf76f10c3dc80609d4e2cdc1e847429086, 6.12.17 |
| amazon:2023 | kernel-libbpf-static | 0 |
| amazon:2023 | kernel-libbpf | 0 |
| linux | linux_kernel | 5.19, 5.19, 5.19 |
| amazon:2023 | kernel-tools | 0 |
| Siemens | SIPLUS S7-1500 CPU 1518-4 PN/DP MFP | 3.1.7, 3.1.5, 3.1.6 |
| amazon:2023 | bpftool | 0 |
| Siemens | SIMATIC S7-1500 TM MFP - GNU/Linux subsystem | 0 |
| amazon:2023 | kernel-modules-extra-common | 0 |
| amazon:2023 | kernel-headers | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP | 3.1.5, 3.1.6, 3.1.7 |
| amazon:2023 | kernel | 0 |
| amazon:2023 | kernel-libbpf-devel | 0 |
…and 7 more
Timeline
- Mar 11, 2025 CVE Published
- Mar 12, 2025 Coalition ESS Score (16 in total, the first dated here)
- Mar 13, 2025 EPSS Score (30 in total, the first dated here)
- Dec 18, 2025 PoC Published
- Dec 22, 2025 Security Advisory (155 in total, the first dated here)
- Apr 29, 2026 Distribution Patch (152 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-21864
vulnetix vdb fixes CVE-2025-21864
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-21864/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html url
- https://cert-portal.siemens.com/productcert/html/ssa-082556.html url
- https://cert-portal.siemens.com/productcert/html/ssa-019113.html url
- https://cert-portal.siemens.com/productcert/html/ssa-457936.html url
- https://cert-portal.siemens.com/productcert/html/ssa-784472.html url