# CVE-2026-72139: tcp: defer md5sig\_info kfree past RCU grace period in tcp\_connect

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

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.63% (percentile 45, 2026-11-26)
- **Published:** 2026-08-15T05:53:13.279Z
- **Modified:** 2026-08-17T06:18:13.823Z

## Who should check

- Anyone running Linux \>= 51e547e8c89c661f6fbede4a28b1d33b13625683, \< 33a1bee413628378fd036a4f2b17ba86b0bc560c; \>= 51e547e8c89c661f6fbede4a28b1d33b13625683, \< da48b9bf1eb95a9cfd09d615ca58cfc2b03de369; \>= 51e547e8c89c661f6fbede4a28b1d33b13625683, \< b74cd55038905d5e74c1de109ab78a30b2ea0e1f
- Anyone running Linux 6.18

## Description

In the Linux kernel, the following vulnerability has been resolved:

tcp: defer md5sig\_info kfree past RCU grace period in tcp\_connect

The md5+ao reconciliation in tcp\_connect() (net/ipv4/tcp\_output.c)
has two symmetric branches:

	if (needs\_md5) {
		tcp\_ao\_destroy\_sock(sk, false);
	} else if (needs\_ao) {
		tcp\_clear\_md5\_list(sk);
		kfree(rcu\_replace\_pointer(tp-\>md5sig\_info, NULL, ...));
	}

Both branches free a per-socket auth-info object while the socket is
in TCP\_SYN\_SENT and is already on the inet ehash (inserted by
inet\_hash\_connect() in tcp\_v4\_connect()). Both branches are reachable
by softirq RX-path readers that load the corresponding info pointer
via implicit RCU before bh\_lock\_sock\_nested() is taken.

The needs\_md5 branch is fixed in the prior patch by re-introducing
the call\_rcu() free in tcp\_ao\_destroy\_sock(): the equivalent per-key
loop runs inside tcp\_ao\_info\_free\_rcu(), the RCU callback, so by the
time it frees each tcp\_ao\_key all softirq readers that captured the
container have already completed rcu\_read\_unlock().

The needs\_ao branch is not symmetric in the same way. The container
free can be deferred via kfree\_rcu(md5sig, rcu) -- struct
tcp\_md5sig\_info already has the required rcu member
(include/net/tcp.h:1999-2002), and the rest of the tree already does
this in the tcp\_md5sig\_info\_add() rollback paths
(net/ipv4/tcp\_ipv4.c:1410, 1436). But the per-key teardown is done
by tcp\_clear\_md5\_list() in process context BEFORE the container's
RCU grace period: it walks &md5sig-\>head and frees each
tcp\_md5sig\_key with bare hlist\_del + kfree. A concurrent softirq
reader in \_\_tcp\_md5\_do\_lookup() / \_\_tcp\_md5\_do\_lookup\_exact()
(tcp\_ipv4.c:1253, 1298) walks the same list via
hlist\_for\_each\_entry\_rcu() and races with that bare kfree on the
keys themselves -- a per-key slab use-after-free of the same class
as the TCP-AO bug, on the same race window.

Fix this in two halves:

  1. Convert the bare kfree() in tcp\_connect() to kfree\_rcu() so the
     md5sig\_info container joins the rest of the md5sig lifecycle.
     The local-variable lift is mechanical and required because
     kfree\_rcu() is a macro that expects an lvalue.

  2. Make tcp\_clear\_md5\_list() RCU-safe by replacing hlist\_del +
     kfree(key) with hlist\_del\_rcu + kfree\_rcu(key, rcu). struct
     tcp\_md5sig\_key already carries the rcu member
     (include/net/tcp.h:1995) and tcp\_md5\_do\_del()
     (net/ipv4/tcp\_ipv4.c:1456) already uses kfree\_rcu, so this
     restores the lifecycle invariant the rest of the file follows
     rather than introducing a one-off.

The other caller of tcp\_clear\_md5\_list() is tcp\_md5\_destruct\_sock()
(net/ipv4/tcp.c:412), which runs from the sock destructor when the
socket is already unhashed and unreachable; the extra grace period
there is unnecessary but harmless. Making the helper unconditionally
RCU-safe is the cleaner contract.

The needs\_ao branch is not reachable by the userns reproducer used
to demonstrate the AO-side splat (the repro installs both keys but
ends up in the needs\_md5 branch because the connect peer matches
the MD5 key, not the AO key); however the symmetric race exists
and a maintainer touching this code should not have to think about
which branch escapes RCU and which one does not.

\[also credits to Qihang, who found that this races with tcp-diag\]

## Affected and fixed versions

- Linux: \>= 51e547e8c89c661f6fbede4a28b1d33b13625683, \< 33a1bee413628378fd036a4f2b17ba86b0bc560c; \>= 51e547e8c89c661f6fbede4a28b1d33b13625683, \< da48b9bf1eb95a9cfd09d615ca58cfc2b03de369; \>= 51e547e8c89c661f6fbede4a28b1d33b13625683, \< b74cd55038905d5e74c1de109ab78a30b2ea0e1f (cvelist)
- Linux: 6.18 (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-2026-72139. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-72139.md
Affected: Linux >= 51e547e8c89c661f6fbede4a28b1d33b13625683, < 33a1bee413628378fd036a4f2b17ba86b0bc560c; >= 51e547e8c89c661f6fbede4a28b1d33b13625683, < da48b9bf1eb95a9cfd09d615ca58cfc2b03de369; >= 51e547e8c89c661f6fbede4a28b1d33b13625683, < b74cd55038905d5e74c1de109ab78a30b2ea0e1f; Linux 6.18
Fixed in: Linux 33a1bee413628378fd036a4f2b17ba86b0bc560c

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-2026-72139 being exploited?

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

### How serious is CVE-2026-72139?

Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2026-72139?

Linux \>= 51e547e8c89c661f6fbede4a28b1d33b13625683, \< 33a1bee413628378fd036a4f2b17ba86b0bc560c; \>= 51e547e8c89c661f6fbede4a28b1d33b13625683, \< da48b9bf1eb95a9cfd09d615ca58cfc2b03de369; \>= 51e547e8c89c661f6fbede4a28b1d33b13625683, \< b74cd55038905d5e74c1de109ab78a30b2ea0e1f; Linux 6.18.

### Is there a fix for CVE-2026-72139?

Yes. Fixed in Linux 33a1bee413628378fd036a4f2b17ba86b0bc560c. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-72139?

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

- other: <https://git.kernel.org/stable/c/33a1bee413628378fd036a4f2b17ba86b0bc560c>
- other: <https://git.kernel.org/stable/c/da48b9bf1eb95a9cfd09d615ca58cfc2b03de369>
- other: <https://git.kernel.org/stable/c/b74cd55038905d5e74c1de109ab78a30b2ea0e1f>

## 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-2026-72139>

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