CVE-2025-39852
net/tcp: Fix socket memory leak in TCP-AO failure handling for IPv6
Reported by linux · Published September 19, 2025
In the Linux kernel, the following vulnerability has been resolved: net/tcp: Fix socket memory leak in TCP-AO failure handling for IPv6 When tcp_ao_copy_all_matching() fails in tcp_v6_syn_recv_sock() it just exits the function. This ends up causing a memory-leak: unreferenced object 0xffff0000281a8200 (size 2496): comm "softirq", pid 0, jiffies 4295174684 hex dump (first 32 bytes): 7f 00 00 06 7f 00 00 06 00 00 00 00 cb a8 88 13 ................ 0a 00 03 61 00 00 00 00 00 00 00 00 00 00 00 00 ...a............ backtrace (crc 5ebdbe15): kmemleak_alloc+0x44/0xe0 kmem_cache_alloc_noprof+0x248/0x470 sk_prot_alloc+0x48/0x120 sk_clone_lock+0x38/0x3b0 inet_csk_clone_lock+0x34/0x150 tcp_create_openreq_child+0x3c/0x4a8 tcp_v6_syn_recv_sock+0x1c0/0x620 tcp_check_req+0x588/0x790 tcp_v6_rcv+0x5d0/0xc18 ip6_protocol_deliver_rcu+0x2d8/0x4c0 ip6_input_finish+0x74/0x148 ip6_input+0x50/0x118 ip6_sublist_rcv+0x2fc/0x3b0 ipv6_list_rcv+0x114/0x170 __netif_receive_skb_list_core+0x16c/0x200 netif_receive_skb_list_internal+0x1f0/0x2d0 This is because in tcp_v6_syn_recv_sock (and the IPv4 counterpart), when exiting upon error, inet_csk_prepare_forced_close() and tcp_done() need to be called. They make sure the newsk will end up being correctly free'd. tcp_v4_syn_recv_sock() makes this very clear by having the put_and_exit label that takes care of things. So, this patch here makes sure tcp_v4_syn_recv_sock and tcp_v6_syn_recv_sock have similar error-handling and thus fixes the leak for TCP-AO.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| Linux | Linux | fa390321aba0a54d0f7ae95ee4ecde1358bb9234, 46d33c878fc0b3d7570366b2c9912395b3f4e701, 3d2b356d994a8801acb397cafd28b13672c37ab5 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 06b22ef29591f625ef877ae00d82192938e29e60, 06b22ef29591f625ef877ae00d82192938e29e60, 06b22ef29591f625ef877ae00d82192938e29e60 |
| Linux | Linux | 6.7, 0, 6.12.46 |
| Linux | Linux | 06b22ef29591f625ef877ae00d82192938e29e60, 6.16.6, 6.12.46 |
| amazon:2023 | kernel6.12-libbpf-devel | 0 |
| amazon:2023 | kernel6.12-devel | 0 |
| amazon:2023 | perf6.12 | 0 |
| amazon:2023 | kernel6.12-headers | 0 |
| amazon:2023 | kernel-livepatch-6.12.46-66.121 | 0 |
| amazon:2023 | kernel6.12-modules-extra | 0 |
| amazon:2023 | kernel6.12-libbpf | 0 |
| amazon:2023 | kernel6.12-modules-extra-common | 0 |
| amazon:2023 | python3-perf6.12 | 0 |
| amazon:2023 | kernel6.12-tools-devel | 0 |
| amazon:2023 | bpftool6.12 | 0 |
| linux | linux_kernel | 6.7, 6.7, 6.7 |
| amazon:2023 | kernel6.12-libbpf-static | 0 |
| amazon:2023 | kernel6.12-tools | 0 |
| amazon:2023 | kernel6.12 | 0 |
Timeline
- Sep 19, 2025 CVE Published
- Sep 20, 2025 EPSS Score (30 in total, the first dated here)
- Oct 4, 2025 Coalition ESS Score (15 in total, the first dated here)
- Oct 12, 2025 PoC Published (9 in total, the first dated here)
- Dec 5, 2025 CVE Updated
- Dec 15, 2025 Security Advisory (98 in total, the first dated here)
- Mar 29, 2026 Distribution Patch (87 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-39852
vulnetix vdb fixes CVE-2025-39852
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-39852/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart