syzbot


KMSAN: uninit-value in raw_sock_get

Status: fixed on 2023/06/08 14:41
Subsystems: net
[Documentation on labels]
Fix commit: 0a78cf7264d2 raw: Fix NULL deref in raw_get_next().
First crash: 411d, last: 411d

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in raw_lookup net/ipv4/raw_diag.c:43 [inline]
BUG: KMSAN: uninit-value in raw_sock_get+0x583/0x790 net/ipv4/raw_diag.c:72
 raw_lookup net/ipv4/raw_diag.c:43 [inline]
 raw_sock_get+0x583/0x790 net/ipv4/raw_diag.c:72
 raw_diag_dump_one+0xa5/0x620 net/ipv4/raw_diag.c:100
 inet_diag_cmd_exact+0x94d/0xa20
 inet_diag_get_exact_compat net/ipv4/inet_diag.c:1302 [inline]
 inet_diag_rcv_msg_compat+0x476/0x520 net/ipv4/inet_diag.c:1324
 sock_diag_rcv_msg+0x1d7/0x530
 netlink_rcv_skb+0x3f8/0x750 net/netlink/af_netlink.c:2574
 sock_diag_rcv+0x40/0x60 net/core/sock_diag.c:280
 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
 netlink_unicast+0xf41/0x1270 net/netlink/af_netlink.c:1365
 netlink_sendmsg+0x127d/0x1430 net/netlink/af_netlink.c:1942
 sock_sendmsg_nosec net/socket.c:724 [inline]
 sock_sendmsg net/socket.c:747 [inline]
 ____sys_sendmsg+0xa24/0xe40 net/socket.c:2501
 ___sys_sendmsg+0x2a1/0x3f0 net/socket.c:2555
 __sys_sendmsg net/socket.c:2584 [inline]
 __do_sys_sendmsg net/socket.c:2593 [inline]
 __se_sys_sendmsg net/socket.c:2591 [inline]
 __x64_sys_sendmsg+0x36b/0x540 net/socket.c:2591
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

Local variable req.i created at:
 inet_diag_get_exact_compat net/ipv4/inet_diag.c:1294 [inline]
 inet_diag_rcv_msg_compat+0x2c5/0x520 net/ipv4/inet_diag.c:1324
 sock_diag_rcv_msg+0x1d7/0x530

CPU: 1 PID: 24512 Comm: syz-executor.1 Not tainted 6.3.0-rc5-syzkaller-g9189d4cb6980 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023
=====================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/04/09 20:14 https://github.com/google/kmsan.git master 9189d4cb6980 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce KMSAN: uninit-value in raw_sock_get
* Struck through repros no longer work on HEAD.