syzbot


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

Status: internal: reported on 2022/05/05 11:52
Reported-by: syzbot+@syzkaller.appspotmail.com
Fix commit: d5076fe4049c netlink: do not reset transport header in netlink_recvmsg()
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 100d, last: 20d
similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg (3) 30 314d 471d 0/22 auto-closed as invalid on 2021/09/22 07:53
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg (2) 1 593d 564d 0/22 auto-closed as invalid on 2020/12/25 11:25
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg (4) 13 170d 270d 0/22 auto-closed as invalid on 2022/02/13 19:27
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg 4 891d 964d 0/22 auto-closed as invalid on 2020/03/29 12:33

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

write to 0xffff888167e9cb38 of 8 bytes by task 12125 on cpu 0:
 netlink_recvmsg+0x12c/0x740 net/netlink/af_netlink.c:1968
 ____sys_recvmsg+0x162/0x2f0
 ___sys_recvmsg net/socket.c:2753 [inline]
 __sys_recvmsg+0x1fd/0x3d0 net/socket.c:2783
 __do_sys_recvmsg net/socket.c:2793 [inline]
 __se_sys_recvmsg net/socket.c:2790 [inline]
 __x64_sys_recvmsg+0x42/0x50 net/socket.c:2790
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

read to 0xffff888167e9cb38 of 8 bytes by task 12128 on cpu 1:
 netlink_recvmsg+0xee/0x740 net/netlink/af_netlink.c:1967
 ____sys_recvmsg+0x162/0x2f0
 ___sys_recvmsg net/socket.c:2753 [inline]
 do_recvmmsg+0x53a/0xa30 net/socket.c:2847
 __sys_recvmmsg net/socket.c:2928 [inline]
 __do_sys_recvmmsg net/socket.c:2949 [inline]
 __se_sys_recvmmsg net/socket.c:2942 [inline]
 __x64_sys_recvmmsg+0xf5/0x160 net/socket.c:2942
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

value changed: 0x0000000000000000 -> 0x0000000000000403

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 12128 Comm: syz-executor.3 Not tainted 5.19.0-rc1-syzkaller-00023-g34f4335c16a5-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/06/08 22:00 upstream 34f4335c16a5 0d5abf15 .config log report info KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
ci2-upstream-kcsan-gce 2022/04/10 06:42 upstream e1f700ebd6be e22c3da3 .config log report info KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
ci2-upstream-kcsan-gce 2022/03/27 18:11 upstream f022814633e1 89bc8608 .config log report info KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
ci2-upstream-kcsan-gce 2022/03/21 00:06 upstream 14702b3b2438 e2d91b1d .config log report info KCSAN: data-race in netlink_recvmsg / netlink_recvmsg