Cloudanix VulnDB

CVE-2025-39852

None

CVSS

—

EPSS

0.1%

Published

Sep 19, 2025

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in the Linux kernel can slowly leak memory when handling certain IPv6 network connections, eventually slowing down or crashing servers that stay online for long periods.

Exploitation
Remote Authenticated
Attacker needs
None
Complexity
Theoretical
Impact
Denial Of Service
Component
OS kernel
Class
Memory Corruption
Remediation
Patch
Effort
Low
Patch risk
Low

What it actually does

Memory leak of newly allocated TCP socket structures (sk_prot_alloc / sk_clone_lock) in tcp_v6_syn_recv_sock when tcp_ao_copy_all_matching fails; the error path omits inet_csk_prepare_forced_close and tcp_done, leaving the object unreferenced.

Why it matters to the business

Systems accepting many IPv6 TCP connections that use TCP Authentication Option can gradually exhaust kernel memory, degrading performance or triggering OOM kills on long-lived servers.

How an attack unfolds

An attacker initiates IPv6 TCP handshakes that trigger the TCP-AO failure path in tcp_v6_syn_recv_sock; repeated failures accumulate leaked socket objects until memory pressure causes denial of service.

How to fix it

Upgrade the Linux kernel to a version containing commit 46d33c878fc0b3d7570366b2c9912395b3f4e701 or later; apply the same error-handling pattern used in tcp_v4_syn_recv_sock (put_and_exit label) to both IPv4 and IPv6 paths.

How to confirm the fix worked

Confirm the presence of commit 46d33c878fc0b3d7570366b2c9912395b3f4e701 in the running kernel source or binary; run kmemleak or slabinfo before/after synthetic IPv6 TCP-AO failure tests to verify leak elimination.

Typical attack path

  1. Send crafted IPv6 SYN packets that cause tcp_ao_copy_all_matching to fail inside tcp_v6_syn_recv_sock
  2. Trigger the early return that bypasses forced-close cleanup
  3. Repeat to accumulate unreferenced socket allocations
  4. Monitor for kernel memory exhaustion or OOM events

How to detect it

Inspect kernel logs and kmemleak reports for unreferenced sk_buff or sock objects allocated from tcp_v6_syn_recv_sock or tcp_create_openreq_child during IPv6 SYN processing; correlate with TCP-AO enabled listeners.

What your security team should do

  • Prioritize kernel upgrade on all systems that enable TCP-AO over IPv6
  • Monitor kernel memory usage and OOM logs on IPv6-facing servers
  • Apply the patch or backport the error-handling fix if immediate reboot is not feasible

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
Debian:13 linux 0 6.12.48-1
Debian:14 linux 0 6.16.6-1
Linux Kernel 6.7.0 6.12.46
openSUSE:Leap 16.0 dtb-aarch64 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-64kb 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-default 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-default-base 0 6.12.0-160000.6.1.160000.2.4
openSUSE:Leap 16.0 kernel-docs 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-kvmsmall 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-obs-build 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-obs-qa 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-rt 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-source 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-syms 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-zfcpdump 0 6.12.0-160000.6.1

Related vulnerabilities