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-arm64 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-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 312d, last: 14d
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 527d 683d 0/24 auto-closed as invalid on 2021/09/22 07:53
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg (2) 1 806d 777d 0/24 auto-closed as invalid on 2020/12/25 11:25
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg (4) 13 382d 482d 0/24 auto-closed as invalid on 2022/02/13 19:27
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg 4 1104d 1176d 0/24 auto-closed as invalid on 2020/03/29 12:33

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

read to 0xffff888104ed2338 of 8 bytes by task 24160 on cpu 1:
 netlink_recvmsg+0xee/0x740 net/netlink/af_netlink.c:1978
 sock_recvmsg_nosec net/socket.c:995 [inline]
 sock_recvmsg net/socket.c:1013 [inline]
 __sys_recvfrom+0x1db/0x2a0 net/socket.c:2169
 __do_sys_recvfrom net/socket.c:2187 [inline]
 __se_sys_recvfrom net/socket.c:2183 [inline]
 __x64_sys_recvfrom+0x74/0x90 net/socket.c:2183
 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+0x63/0xcd

write to 0xffff888104ed2338 of 8 bytes by task 24154 on cpu 0:
 netlink_recvmsg+0x12c/0x740 net/netlink/af_netlink.c:1979
 sock_recvmsg_nosec net/socket.c:995 [inline]
 sock_recvmsg net/socket.c:1013 [inline]
 __sys_recvfrom+0x1db/0x2a0 net/socket.c:2169
 __do_sys_recvfrom net/socket.c:2187 [inline]
 __se_sys_recvfrom net/socket.c:2183 [inline]
 __x64_sys_recvfrom+0x74/0x90 net/socket.c:2183
 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+0x63/0xcd

value changed: 0x0000000000000000 -> 0x0000000000001000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 24154 Comm: syz-executor.2 Not tainted 6.2.0-rc3-syzkaller-00060-gc757fc92a3f7-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
==================================================================

Crashes (12):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-kcsan-gce 2023/01/13 12:03 upstream c757fc92a3f7 96166539 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
ci2-upstream-kcsan-gce 2022/11/12 01:58 upstream eb037f16f7e8 f42ee5d8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
ci2-upstream-kcsan-gce 2022/10/28 11:06 upstream 23758867219c 5c716ff6 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
ci2-upstream-kcsan-gce 2022/09/28 11:51 upstream 46452d3786a8 75c78242 .config console log report info [disk image] [vmlinux] KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
ci2-upstream-kcsan-gce 2022/09/12 19:07 upstream 80e78fcce86d f371ed7e .config console log report info [disk image] [vmlinux] KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
ci2-upstream-kcsan-gce 2022/09/04 15:59 upstream 7726d4c3e60b 28811d0a .config console log report info [disk image] [vmlinux] KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
ci2-upstream-kcsan-gce 2022/07/18 10:34 upstream ff6992735ade 95cb00d1 .config console log report info KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
ci2-upstream-kcsan-gce 2022/07/07 08:12 upstream 9f09069cde34 bff65f44 .config console log report info KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
ci2-upstream-kcsan-gce 2022/06/08 22:00 upstream 34f4335c16a5 0d5abf15 .config console log report info KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
ci2-upstream-kcsan-gce 2022/04/10 06:42 upstream e1f700ebd6be e22c3da3 .config console log report info KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
ci2-upstream-kcsan-gce 2022/03/27 18:11 upstream f022814633e1 89bc8608 .config console log report info KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
ci2-upstream-kcsan-gce 2022/03/21 00:06 upstream 14702b3b2438 e2d91b1d .config console log report info KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
* Struck through repros no longer work on HEAD.