syzbot


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

Status: fixed on 2023/02/24 13:50
Subsystems: net
[Documentation on labels]
Fix commit: d5076fe4049c netlink: do not reset transport header in netlink_recvmsg()
First crash: 960d, last: 661d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg (6) net 2 583d 581d 22/28 fixed on 2023/06/08 14:41
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg (3) net 30 1174d 1330d 0/28 auto-closed as invalid on 2021/09/22 07:53
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg (2) net 1 1453d 1424d 0/28 auto-closed as invalid on 2020/12/25 11:25
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg (4) net 13 1030d 1130d 0/28 auto-closed as invalid on 2022/02/13 19:27
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg (7) net 1 402d 398d 25/28 fixed on 2023/12/22 15:08
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg net 4 1751d 1824d 0/28 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):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/13 12:03 upstream c757fc92a3f7 96166539 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
2022/11/12 01:58 upstream eb037f16f7e8 f42ee5d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
2022/10/28 11:06 upstream 23758867219c 5c716ff6 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
2022/09/28 11:51 upstream 46452d3786a8 75c78242 .config console log report info [disk image] [vmlinux] ci2-upstream-kcsan-gce KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
2022/09/12 19:07 upstream 80e78fcce86d f371ed7e .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
2022/09/04 15:59 upstream 7726d4c3e60b 28811d0a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
2022/07/18 10:34 upstream ff6992735ade 95cb00d1 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
2022/07/07 08:12 upstream 9f09069cde34 bff65f44 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
2022/06/08 22:00 upstream 34f4335c16a5 0d5abf15 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
2022/04/10 06:42 upstream e1f700ebd6be e22c3da3 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
2022/03/27 18:11 upstream f022814633e1 89bc8608 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
2022/03/21 00:06 upstream 14702b3b2438 e2d91b1d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
* Struck through repros no longer work on HEAD.