Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 431593C5DB6 for ; Fri, 1 May 2026 14:20:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777645202; cv=none; b=RpwqgkCnqdpPj0zgWMfFImU6ayfRBTP668LHoF2loyyiyxgZSFUQ+1s8Q4XOGI3rBdPMPrj7Wcd7cAkMnX/hL3ANY5mLTKFBEeYSYyU80TgH1bXfr+QpBDCvaU9nSS4k3M+PtdFxO3KVlv+vKZzbkJOB6NZYd3Q57QpxTYO678g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777645202; c=relaxed/simple; bh=QVfOYO6RqCSZSSxZNjN+pT8MULO4f6xtbMA6GSgJbi4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NCWTeeLoEL5DWJBPNKpaiou6F5H/WHxs3UVqqUiRv5uXiqjy302hTNAPhzzfvlh6PdZBvu3mF1TJufzh8/XzHH1mBJey6U1jg8/2MVb0sZzRJE+JiBIpSBW97djmAnyEjqx+rqamVPA2c2ykyVB+30cjXCBN59GBem+9oAyKxzg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=u8mtfeha; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="u8mtfeha" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D95AC2BCB4; Fri, 1 May 2026 14:20:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777645201; bh=QVfOYO6RqCSZSSxZNjN+pT8MULO4f6xtbMA6GSgJbi4=; h=From:To:Cc:Subject:Date:Reply-To:From; b=u8mtfehawRb9x+KXUFFGGS2XqaI1H4iAwc0u4VHdUy1r/ItiKdn3KhDVu+Ktmh71+ QNe8baQlYSGq4y2sCwl+OppP39/anu9fPYdDM+WcNtT2N034lOFTIkNY3Kn/R03RqL DGS0NZ+7pqafRbgkwp/Dxu31RO6qi8vuzSM6oFxU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-43016: bpf: sockmap: Fix use-after-free of sk->sk_socket in sk_psock_verdict_data_ready(). Date: Fri, 1 May 2026 16:15:49 +0200 Message-ID: <2026050156-CVE-2026-43016-78fc@gregkh> X-Mailer: git-send-email 2.54.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=6752; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=upRZSG/kkcraRGLRUC26NayFMjClKO+YwP6YWkZ8wX4=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlftiaUrYl5d37+dp8Xl29XLF0W9Pk/i+yNoCXTjutsP GzOwKkr3BHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATmb6DYb6nrcKSjBXfb15Z FjItP+Hs1zuV8UcYFsxbfGnBpt+nF3WrxFlNW7GQ39bwXAUA 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: bpf: sockmap: Fix use-after-free of sk->sk_socket in sk_psock_verdict_data_ready(). syzbot reported use-after-free of AF_UNIX socket's sk->sk_socket in sk_psock_verdict_data_ready(). [0] In unix_stream_sendmsg(), the peer socket's ->sk_data_ready() is called after dropping its unix_state_lock(). Although the sender socket holds the peer's refcount, it does not prevent the peer's sock_orphan(), and the peer's sk_socket might be freed after one RCU grace period. Let's fetch the peer's sk->sk_socket and sk->sk_socket->ops under RCU in sk_psock_verdict_data_ready(). [0]: BUG: KASAN: slab-use-after-free in sk_psock_verdict_data_ready+0xec/0x590 net/core/skmsg.c:1278 Read of size 8 at addr ffff8880594da860 by task syz.4.1842/11013 CPU: 1 UID: 0 PID: 11013 Comm: syz.4.1842 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 sk_psock_verdict_data_ready+0xec/0x590 net/core/skmsg.c:1278 unix_stream_sendmsg+0x8a3/0xe80 net/unix/af_unix.c:2482 sock_sendmsg_nosec net/socket.c:721 [inline] __sock_sendmsg net/socket.c:736 [inline] ____sys_sendmsg+0x972/0x9f0 net/socket.c:2585 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2639 __sys_sendmsg net/socket.c:2671 [inline] __do_sys_sendmsg net/socket.c:2676 [inline] __se_sys_sendmsg net/socket.c:2674 [inline] __x64_sys_sendmsg+0x1bd/0x2a0 net/socket.c:2674 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7facf899c819 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007facf9827028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007facf8c15fa0 RCX: 00007facf899c819 RDX: 0000000000000000 RSI: 0000200000000500 RDI: 0000000000000004 RBP: 00007facf8a32c91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007facf8c16038 R14: 00007facf8c15fa0 R15: 00007ffd41b01c78 Allocated by task 11013: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4538 [inline] slab_alloc_node mm/slub.c:4866 [inline] kmem_cache_alloc_lru_noprof+0x2b8/0x640 mm/slub.c:4885 sock_alloc_inode+0x28/0xc0 net/socket.c:316 alloc_inode+0x6a/0x1b0 fs/inode.c:347 new_inode_pseudo include/linux/fs.h:3003 [inline] sock_alloc net/socket.c:631 [inline] __sock_create+0x12d/0x9d0 net/socket.c:1562 sock_create net/socket.c:1656 [inline] __sys_socketpair+0x1c4/0x560 net/socket.c:1803 __do_sys_socketpair net/socket.c:1856 [inline] __se_sys_socketpair net/socket.c:1853 [inline] __x64_sys_socketpair+0x9b/0xb0 net/socket.c:1853 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 15: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2685 [inline] slab_free mm/slub.c:6165 [inline] kmem_cache_free+0x187/0x630 mm/slub.c:6295 rcu_do_batch kernel/rcu/tree.c:2617 [inline] rcu_core+0x7cd/0x1070 kernel/rcu/tree.c:2869 handle_softirqs+0x22a/0x870 kernel/softirq.c:622 run_ksoftirqd+0x36/0x60 kernel/softirq.c:1063 smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The Linux kernel CVE team has assigned CVE-2026-43016 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit c63829182c37c2d6d0608976d15fa61ebebe9e6b and fixed in 6.6.134 with commit 8d597e3e74027900ffa81b8ff47ab51999a3e110 Issue introduced in 5.15 with commit c63829182c37c2d6d0608976d15fa61ebebe9e6b and fixed in 6.12.81 with commit 68187f18a89be4b6237d28ae1313b5adf76238c6 Issue introduced in 5.15 with commit c63829182c37c2d6d0608976d15fa61ebebe9e6b and fixed in 6.18.22 with commit 18861f87a043e78b1f901cae4237e755ed7ef095 Issue introduced in 5.15 with commit c63829182c37c2d6d0608976d15fa61ebebe9e6b and fixed in 6.19.12 with commit af95bc39a83d82ae6ad253986335037256888b3f Issue introduced in 5.15 with commit c63829182c37c2d6d0608976d15fa61ebebe9e6b and fixed in 7.0 with commit ad8391d37f334ee73ba91926f8b4e4cf6d31ea04 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-43016 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/core/skmsg.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/8d597e3e74027900ffa81b8ff47ab51999a3e110 https://git.kernel.org/stable/c/68187f18a89be4b6237d28ae1313b5adf76238c6 https://git.kernel.org/stable/c/18861f87a043e78b1f901cae4237e755ed7ef095 https://git.kernel.org/stable/c/af95bc39a83d82ae6ad253986335037256888b3f https://git.kernel.org/stable/c/ad8391d37f334ee73ba91926f8b4e4cf6d31ea04