VDB

CVE-2025-21864

CVE-2025-21864 PUBLISHED CVSS 7.8 HIGH

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.

PackageEcosystemFixed in
kernel-develAmazon Linux6.1.130-139.222.amzn2023
perfAmazon Linux6.1.130-139.222.amzn2023
kernel-livepatch-6.1.130-139.222Amazon Linux1.0-0.amzn2023

Risk scores

CVSS 3.1
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
LinuxLinux68822bdf76f10c3dc80609d4e2cdc1e847429086, 68822bdf76f10c3dc80609d4e2cdc1e847429086, 68822bdf76f10c3dc80609d4e2cdc1e847429086
LinuxLinux5.19, 0, 6.1.130
amazon:2023kernel-devel0
amazon:2023perf0
SiemensSIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0)3.1.6, 3.1.7, 3.1.5
amazon:2023kernel-livepatch-6.1.130-139.2220
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0)3.1.5, 3.1.6, 3.1.7
LinuxLinux68822bdf76f10c3dc80609d4e2cdc1e847429086, 68822bdf76f10c3dc80609d4e2cdc1e847429086, 6.12.17
amazon:2023kernel-libbpf-static0
amazon:2023kernel-libbpf0
linuxlinux_kernel5.19, 5.19, 5.19
amazon:2023kernel-tools0
SiemensSIPLUS S7-1500 CPU 1518-4 PN/DP MFP3.1.7, 3.1.5, 3.1.6
amazon:2023bpftool0
SiemensSIMATIC S7-1500 TM MFP - GNU/Linux subsystem0
amazon:2023kernel-modules-extra-common0
amazon:2023kernel-headers0
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFP3.1.5, 3.1.6, 3.1.7
amazon:2023kernel0
amazon:2023kernel-libbpf-devel0

…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

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›