syzbot


KCSAN: data-race in __netlink_dump_start / netlink_recvmsg (5)

Status: fixed on 2023/07/01 16:05
Subsystems: net
[Documentation on labels]
Fix commit: a939d14919b7 netlink: annotate accesses to nlk->cb_running
First crash: 408d, last: 384d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __netlink_dump_start / netlink_recvmsg net 1 1397d 1397d 0/26 auto-closed as invalid on 2020/08/03 12:45
upstream KCSAN: data-race in __netlink_dump_start / netlink_recvmsg (2) net 6 725d 810d 0/26 auto-closed as invalid on 2022/06/06 15:00
upstream KCSAN: data-race in __netlink_dump_start / netlink_recvmsg (4) net 1 595d 595d 0/26 auto-obsoleted due to no activity on 2022/10/15 01:07
upstream KCSAN: data-race in __netlink_dump_start / netlink_recvmsg (3) net 1 633d 633d 0/26 auto-closed as invalid on 2022/09/06 16:34

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __netlink_dump_start / netlink_recvmsg

write to 0xffff88813ea4db59 of 1 bytes by task 28219 on cpu 0:
 __netlink_dump_start+0x3af/0x4d0 net/netlink/af_netlink.c:2399
 netlink_dump_start include/linux/netlink.h:308 [inline]
 rtnetlink_rcv_msg+0x70f/0x8c0 net/core/rtnetlink.c:6130
 netlink_rcv_skb+0x126/0x220 net/netlink/af_netlink.c:2577
 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6192
 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
 netlink_unicast+0x56f/0x640 net/netlink/af_netlink.c:1365
 netlink_sendmsg+0x665/0x770 net/netlink/af_netlink.c:1942
 sock_sendmsg_nosec net/socket.c:724 [inline]
 sock_sendmsg net/socket.c:747 [inline]
 sock_write_iter+0x1aa/0x230 net/socket.c:1138
 call_write_iter include/linux/fs.h:1851 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x463/0x760 fs/read_write.c:584
 ksys_write+0xeb/0x1a0 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:646
 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

read to 0xffff88813ea4db59 of 1 bytes by task 28222 on cpu 1:
 netlink_recvmsg+0x3b4/0x730 net/netlink/af_netlink.c:2022
 sock_recvmsg_nosec+0x4c/0x80 net/socket.c:1017
 ____sys_recvmsg+0x2db/0x310 net/socket.c:2718
 ___sys_recvmsg net/socket.c:2762 [inline]
 do_recvmmsg+0x2e5/0x710 net/socket.c:2856
 __sys_recvmmsg net/socket.c:2935 [inline]
 __do_sys_recvmmsg net/socket.c:2958 [inline]
 __se_sys_recvmmsg net/socket.c:2951 [inline]
 __x64_sys_recvmmsg+0xe2/0x160 net/socket.c:2951
 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

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 28222 Comm: syz-executor.2 Not tainted 6.3.0-rc5-syzkaller-00202-ga79d5c76f705 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/04/09 07:22 upstream a79d5c76f705 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __netlink_dump_start / netlink_recvmsg
2023/03/15 21:35 upstream 6015b1aca1a2 18b58603 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __netlink_dump_start / netlink_recvmsg
* Struck through repros no longer work on HEAD.