# CVE-2025-39852: net/tcp: Fix socket memory leak in TCP-AO failure handling for IPv6

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.23% (percentile 8, 2026-11-26)
- **CWE:** CWE-401
- **Published:** 2025-09-19T15:26:24.312Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= 06b22ef29591f625ef877ae00d82192938e29e60, \< 46d33c878fc0b3d7570366b2c9912395b3f4e701; \>= 06b22ef29591f625ef877ae00d82192938e29e60, \< 3d2b356d994a8801acb397cafd28b13672c37ab5; \>= 06b22ef29591f625ef877ae00d82192938e29e60, \< fa390321aba0a54d0f7ae95ee4ecde1358bb9234
- Anyone running Linux 6.7

## Description

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 and fixed versions

- Linux: \>= 06b22ef29591f625ef877ae00d82192938e29e60, \< 46d33c878fc0b3d7570366b2c9912395b3f4e701; \>= 06b22ef29591f625ef877ae00d82192938e29e60, \< 3d2b356d994a8801acb397cafd28b13672c37ab5; \>= 06b22ef29591f625ef877ae00d82192938e29e60, \< fa390321aba0a54d0f7ae95ee4ecde1358bb9234 (cvelist)
- Linux: 6.7 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-39852.md
Affected: Linux >= 06b22ef29591f625ef877ae00d82192938e29e60, < 46d33c878fc0b3d7570366b2c9912395b3f4e701; >= 06b22ef29591f625ef877ae00d82192938e29e60, < 3d2b356d994a8801acb397cafd28b13672c37ab5; >= 06b22ef29591f625ef877ae00d82192938e29e60, < fa390321aba0a54d0f7ae95ee4ecde1358bb9234; Linux 6.7
Fixed in: Linux 46d33c878fc0b3d7570366b2c9912395b3f4e701, Linux 3d2b356d994a8801acb397cafd28b13672c37ab5

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-39852 being exploited?

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

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

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

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

Linux \>= 06b22ef29591f625ef877ae00d82192938e29e60, \< 46d33c878fc0b3d7570366b2c9912395b3f4e701; \>= 06b22ef29591f625ef877ae00d82192938e29e60, \< 3d2b356d994a8801acb397cafd28b13672c37ab5; \>= 06b22ef29591f625ef877ae00d82192938e29e60, \< fa390321aba0a54d0f7ae95ee4ecde1358bb9234; Linux 6.7.

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

Yes. Fixed in Linux 46d33c878fc0b3d7570366b2c9912395b3f4e701, Linux 3d2b356d994a8801acb397cafd28b13672c37ab5. No fix listed yet: follow the vendor advisory.

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

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/46d33c878fc0b3d7570366b2c9912395b3f4e701>
- patch: <https://git.kernel.org/stable/c/3d2b356d994a8801acb397cafd28b13672c37ab5>
- patch: <https://git.kernel.org/stable/c/fa390321aba0a54d0f7ae95ee4ecde1358bb9234>

## 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-39852>

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