syzbot


KCSAN: data-race in netlink_setsockopt / netlink_setsockopt

Status: fixed on 2023/10/12 12:48
Subsystems: net
[Documentation on labels]
Fix commit: 8fe08d70a2b6 netlink: convert nlk->flags to atomic flags
First crash: 261d, last: 261d

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

read to 0xffff888185925b1c of 4 bytes by task 16762 on cpu 0:
 netlink_setsockopt+0x174/0x6e0
 __sys_setsockopt+0x1c9/0x230 net/socket.c:2263
 __do_sys_setsockopt net/socket.c:2274 [inline]
 __se_sys_setsockopt net/socket.c:2271 [inline]
 __x64_sys_setsockopt+0x66/0x80 net/socket.c:2271
 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

write to 0xffff888185925b1c of 4 bytes by task 16770 on cpu 1:
 netlink_setsockopt+0x5f6/0x6e0
 __sys_setsockopt+0x1c9/0x230 net/socket.c:2263
 __do_sys_setsockopt net/socket.c:2274 [inline]
 __se_sys_setsockopt net/socket.c:2271 [inline]
 __x64_sys_setsockopt+0x66/0x80 net/socket.c:2271
 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: 0x00000000 -> 0x00000080

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 16770 Comm: syz-executor.2 Not tainted 6.5.0-rc5-syzkaller-00056-gcacc6e22932f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/10 03:00 upstream cacc6e22932f 13ca4cd6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in netlink_setsockopt / netlink_setsockopt
* Struck through repros no longer work on HEAD.