CVE-2026-80850
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
04/09/2026
Last modified:
19/10/2026
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
tcp: fix AO info use-after-free in tcp_ao_connect_init()<br />
<br />
tcp_v4_connect() adds a SYN-SENT socket to the ehash before calling<br />
tcp_connect(). If TCP-AO is configured, tcp_connect() first verifies that<br />
a key matches the peer and the bound device&#39;s current L3 master.<br />
tcp_ao_connect_init() later resolves the L3 master again and removes keys<br />
which do not match it.<br />
<br />
The socket lock does not stabilize the bound device&#39;s VRF membership.<br />
Detaching the device from its VRF between the initial validation and the<br />
L3-master calculation in tcp_ao_connect_init() can therefore make the<br />
validation succeed while initialization observes the default L3 domain and<br />
removes the only key. The subsequent AO lookup then fails, so the no-key<br />
path clears tp->ao_info and frees it directly.<br />
<br />
The receive path can find the socket in the ehash and load tp->ao_info<br />
under RCU before acquiring the socket lock. A reader which loaded the old<br />
pointer can thus continue into tcp_inbound_ao_hash() after the direct free.<br />
<br />
The issue was found during a static audit of TCP-AO object lifetime. An<br />
unprivileged reproducer in self-created user and network namespaces raced<br />
connect() with detaching a veth from its VRF while sending TCP-AO segments.<br />
It triggered the same KASAN report on two fresh boots:<br />
<br />
BUG: KASAN: slab-use-after-free in tcp_inbound_ao_hash+0x585/0x19f0<br />
Write of size 8 at addr ffff88800bf88128 by task tcp_ao_vrf_race/232<br />
<br />
Call Trace:<br />
tcp_inbound_ao_hash+0x585/0x19f0<br />
tcp_inbound_hash+0x677/0xa80<br />
tcp_v4_rcv+0x1c3e/0x3ab0<br />
<br />
Allocated by task 235:<br />
tcp_ao_alloc_info+0x43/0xf0<br />
tcp_ao_add_cmd+0xdf7/0x13b0<br />
do_tcp_setsockopt+0x168c/0x2640<br />
<br />
Freed by task 235:<br />
kfree+0x1b8/0x550<br />
tcp_connect+0x252/0x4f00<br />
tcp_v4_connect+0x1114/0x1720<br />
<br />
The bad address is 40 bytes inside the freed 128-byte object, matching the<br />
tcp_ao_info counters.key_not_found field. The two runs used 1000 attempts<br />
each, reached the no-key path 366 and 411 times, and produced one and two<br />
KASAN reports respectively. With this change, the same reproducer reached<br />
the no-key path 366 times in 1000 attempts without a KASAN report or oops.<br />
<br />
Use tcp_ao_destroy_sock() for the no-key path. It unpublishes the AO info,<br />
updates the socket memory and static-key accounting, and defers the free<br />
until after an RCU grace period.<br />
<br />
Also drop the WARN_ON_ONCE() and its stale comment. The VRF detach race<br />
makes the no-key state reachable during normal operation, so it is a<br />
handled condition rather than an impossible assertion. On panic_on_warn<br />
kernels the WARN would turn this handled race into a kernel panic.
Impact
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/284d7fd0eec8774bd6214921fbf525cf907c590e
- https://git.kernel.org/stable/c/594ba77210a1f065832211851a2d7e14d11fcbdb
- https://git.kernel.org/stable/c/70051a57786d5b23f059fbaf5c8241eca14d42ed
- https://git.kernel.org/stable/c/d17e88b6b60ff4ef64e0dd1444f935cb13dee1cd
- https://git.kernel.org/stable/c/ea30dc5267e367b8a5e1e06cc074f813bcbf18b2


