CVE-2026-80850 in Linuxinfo

Summary

by MITRE • 09/04/2026

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

tcp: fix AO info use-after-free in tcp_ao_connect_init()

tcp_v4_connect() adds a SYN-SENT socket to the ehash before calling tcp_connect(). If TCP-AO is configured, tcp_connect() first verifies that a key matches the peer and the bound device's current L3 master. tcp_ao_connect_init() later resolves the L3 master again and removes keys which do not match it.

The socket lock does not stabilize the bound device's VRF membership. Detaching the device from its VRF between the initial validation and the L3-master calculation in tcp_ao_connect_init() can therefore make the validation succeed while initialization observes the default L3 domain and removes the only key. The subsequent AO lookup then fails, so the no-key path clears tp->ao_info and frees it directly.

The receive path can find the socket in the ehash and load tp->ao_info under RCU before acquiring the socket lock. A reader which loaded the old pointer can thus continue into tcp_inbound_ao_hash() after the direct free.

The issue was found during a static audit of TCP-AO object lifetime. An unprivileged reproducer in self-created user and network namespaces raced connect() with detaching a veth from its VRF while sending TCP-AO segments. It triggered the same KASAN report on two fresh boots:

BUG: KASAN: slab-use-after-free in tcp_inbound_ao_hash+0x585/0x19f0 Write of size 8 at addr ffff88800bf88128 by task tcp_ao_vrf_race/232

Call Trace: tcp_inbound_ao_hash+0x585/0x19f0 tcp_inbound_hash+0x677/0xa80 tcp_v4_rcv+0x1c3e/0x3ab0

Allocated by task 235: tcp_ao_alloc_info+0x43/0xf0 tcp_ao_add_cmd+0xdf7/0x13b0 do_tcp_setsockopt+0x168c/0x2640

Freed by task 235: kfree+0x1b8/0x550 tcp_connect+0x252/0x4f00 tcp_v4_connect+0x1114/0x1720

The bad address is 40 bytes inside the freed 128-byte object, matching the tcp_ao_info counters.key_not_found field. The two runs used 1000 attempts each, reached the no-key path 366 and 411 times, and produced one and two KASAN reports respectively. With this change, the same reproducer reached the no-key path 366 times in 1000 attempts without a KASAN report or oops.

Use tcp_ao_destroy_sock() for the no-key path. It unpublishes the AO info, updates the socket memory and static-key accounting, and defers the free until after an RCU grace period.

Also drop the WARN_ON_ONCE() and its stale comment. The VRF detach race makes the no-key state reachable during normal operation, so it is a handled condition rather than an impossible assertion. On panic_on_warn kernels the WARN would turn this handled race into a kernel panic.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 09/05/2026

The Linux kernel contains a critical use-after-free vulnerability within the TCP Authentication Option implementation, specifically located in the tcp_ao_connect_init function and its interaction with Virtual Routing and Forwarding mechanisms. This flaw arises from a race condition involving socket state management during connection initialization. When establishing a new TCP connection using IPv4, the kernel adds the SYN-SENT socket to the endpoint hash table before invoking the core connect routine. If TCP-AO is enabled for this connection, the system performs an initial validation to ensure that the cryptographic key matches both the peer address and the Layer 3 master device associated with the bound network interface. However, the lock protecting the socket does not stabilize the Virtual Routing and Forwarding membership of the bound device during this window. Consequently, if a VRF detachment occurs between the initial validation check and the subsequent L3-master calculation within tcp_ao_connect_init, the initialization logic may observe a default or null L3 domain instead of the originally validated one. This discrepancy causes the system to incorrectly determine that no valid key exists for the connection, triggering a cleanup path that directly frees the TCP-AO information structure without proper synchronization safeguards.

The operational impact of this vulnerability is severe, leading to kernel memory corruption and potential denial of service or arbitrary code execution depending on exploitation conditions. Once the tcp_ao_info structure is freed via kfree in the no-key path, subsequent operations can still access it due to asynchronous processing paths. Specifically, the receive path may locate the socket within the endpoint hash table and load a pointer to the now-freed tp->ao_info under Read-Copy-Update semantics before acquiring the necessary socket locks. A reader thread that captured this stale pointer will proceed into tcp_inbound_ao_hash after the memory has been reclaimed. This results in a use-after-free condition where the kernel writes or reads from invalid memory addresses, as evidenced by Kernel Address Sanitizer reports indicating slab-use-after-free errors at specific offsets within the freed object. The vulnerability is reproducible through unprivileged actions involving self-created user and network namespaces, where an attacker can race connect operations against VRF detachments while sending TCP-AO segments, thereby triggering kernel crashes or panics on systems configured with panic_on_warn enabled.

From a classification perspective, this issue aligns with CWE-416 Use After Free, as the system accesses memory after it has been freed due to improper lifetime management of the tcp_ao_info object. The attack vector involves local privilege escalation potential if an unprivileged user can trigger the race condition repeatedly or influence kernel state in a way that leads to information disclosure through crash dumps or subsequent exploitation chains. In terms of ATT&CK mapping, this vulnerability relates to T1059 Command and Scripting Interpreter via script-based attacks if exploited for code execution, but more directly it represents a flaw in system resource management (T1496 Resource Hijacking) that could lead to availability impact through kernel panics. The root cause is identified as insufficient synchronization of network namespace state changes with socket lifecycle events during the TCP connection establishment phase.

The resolution involves modifying the cleanup logic for the no-key path within tcp_ao_connect_init. Instead of directly freeing the AO info structure, the fix employs tcp_ao_destroy_sock which properly unpublishes the AO information, updates socket memory accounting and static key statistics, and crucially defers the actual memory deallocation until after an RCU grace period has elapsed. This ensures that any concurrent readers holding references to the old pointer will complete their operations before the memory is reclaimed, thereby eliminating the use-after-free window. Additionally, the patch removes a stale WARN_ON_ONCE assertion that previously treated this race condition as an impossible error state rather than a handled operational scenario. Removing this warning prevents false-positive kernel panics on systems where panic_on_warn is enabled, acknowledging that VRF detach races are valid occurrences during normal network configuration changes. This fix restores stability to TCP-AO implementations in complex virtualized networking environments and mitigates the risk of local denial-of-service attacks stemming from race conditions between connection setup and interface reconfiguration.

Responsible

Linux

Reservation

08/26/2026

Disclosure

09/04/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!