From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC3354AEBD4 for ; Fri, 4 Sep 2026 15:57:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788537435; cv=none; b=PaSxc1n42D7o6YTGbqSjmj491wAkW4Bvm10iK1Gyqj2hil+H2M20N1psvCo040+6RmMlGoDx7A77i9ZBenvTx5HlUcmwETcE15NYkdpjvP+BYZraZCUQepzSEIJyXVsTuuXhdGdM3b524NPaTcOeEB9FjUZLozv85f7uKoo0OiI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788537435; c=relaxed/simple; bh=6DViD5xr8yb+4is3GjHxlXtFPtMhSY/LS8vtjrR9w48=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MwIb5DfU96PPsLO0MK/mNguSHfDPmWNjSRG6wNUz9QF1TRjEJ78OMeS22C0y0pKo9Q6sbHv7q/rzoIn4cBlefc3uKzd3k8vQHBmyFEsaaGKkr6lCmDBPlkxENFizAxKCi/MX57GJvQaFxY5NT4ugqgsI2vc7vDGXj8ElEFHxaE4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NikuwdZD; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="NikuwdZD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5D111F00A3D; Fri, 4 Sep 2026 15:57:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1788537432; bh=vAKMJ37fUgY5EPOnIcWQbIGpSzQGEIF0BpxefVHpP8E=; h=From:To:Cc:Subject:Date:Reply-To; b=NikuwdZDdBWGJcrKd5cnoRitHjMuhAi+MzxkxUHnwXeittSxuFJ9y7RZpbZEAHwyC hDlN4bPZezJ4s5r+Bo3maZwuNm227nfJkBSFQ+XTZj8sjmeVqOM1KDlWI8JDWVd1Yu /SYWMsBYynfXcy/OFJtkV8LWZwG5AAgXQ4Osl3Bw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-80850: tcp: fix AO info use-after-free in tcp_ao_connect_init() Date: Fri, 4 Sep 2026 17:53:17 +0200 Message-ID: <2026090400-CVE-2026-80850-3d59@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=5030; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=BGvGd7oPZd41z5CM9rmcY5cDVgQhl8SuT4yyCPrv3OY=; b=owGbwMvMwCRo6H6F97bub03G02pJDFmzXsb8TxMKrDI7Zsu5d+rHKUqJTr+Vw/u/8WWf1t4gy 5y3V+xMRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzkz2KGBWcPqMdN39DIzl6o +f+lN7MRc8SbYIYFUzSPfn3pmK3xJmyndH24r+Jbvo41AA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== 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. The Linux kernel CVE team has assigned CVE-2026-80850 to this issue. Affected and fixed versions =========================== Issue introduced in 6.7 with commit 248411b8cb8974a1e1c8e43123c1e682fbd64969 and fixed in 6.12.108 with commit 594ba77210a1f065832211851a2d7e14d11fcbdb Issue introduced in 6.7 with commit 248411b8cb8974a1e1c8e43123c1e682fbd64969 and fixed in 6.18.49 with commit 70051a57786d5b23f059fbaf5c8241eca14d42ed Issue introduced in 6.7 with commit 248411b8cb8974a1e1c8e43123c1e682fbd64969 and fixed in 7.1.13 with commit 284d7fd0eec8774bd6214921fbf525cf907c590e Issue introduced in 6.7 with commit 248411b8cb8974a1e1c8e43123c1e682fbd64969 and fixed in 7.2.3 with commit d17e88b6b60ff4ef64e0dd1444f935cb13dee1cd Issue introduced in 6.7 with commit 248411b8cb8974a1e1c8e43123c1e682fbd64969 and fixed in 7.3-rc1 with commit ea30dc5267e367b8a5e1e06cc074f813bcbf18b2 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-80850 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: net/ipv4/tcp_ao.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/594ba77210a1f065832211851a2d7e14d11fcbdb https://git.kernel.org/stable/c/70051a57786d5b23f059fbaf5c8241eca14d42ed https://git.kernel.org/stable/c/284d7fd0eec8774bd6214921fbf525cf907c590e https://git.kernel.org/stable/c/d17e88b6b60ff4ef64e0dd1444f935cb13dee1cd https://git.kernel.org/stable/c/ea30dc5267e367b8a5e1e06cc074f813bcbf18b2