syzbot


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

Status: fixed on 2023/06/08 14:41
Subsystems: net
[Documentation on labels]
Fix commit: a1865f2e7d10 netlink: annotate lockless accesses to nlk->max_recvmsg_len
First crash: 632d, last: 616d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg (3) net 30 1207d 1363d 0/28 auto-closed as invalid on 2021/09/22 07:53
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg (2) net 1 1486d 1457d 0/28 auto-closed as invalid on 2020/12/25 11:25
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg (4) net 13 1062d 1162d 0/28 auto-closed as invalid on 2022/02/13 19:27
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg (7) net 1 435d 430d 25/28 fixed on 2023/12/22 15:08
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg net 4 1784d 1856d 0/28 auto-closed as invalid on 2020/03/29 12:33
upstream KCSAN: data-race in netlink_recvmsg / netlink_recvmsg (5) net 12 694d 947d 22/28 fixed on 2023/02/24 13:50

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

read to 0xffff888141840b38 of 8 bytes by task 23057 on cpu 0:
 netlink_recvmsg+0xea/0x730 net/netlink/af_netlink.c:1988
 sock_recvmsg_nosec net/socket.c:1017 [inline]
 sock_recvmsg net/socket.c:1038 [inline]
 __sys_recvfrom+0x1ee/0x2e0 net/socket.c:2194
 __do_sys_recvfrom net/socket.c:2212 [inline]
 __se_sys_recvfrom net/socket.c:2208 [inline]
 __x64_sys_recvfrom+0x78/0x90 net/socket.c:2208
 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 0xffff888141840b38 of 8 bytes by task 23037 on cpu 1:
 netlink_recvmsg+0x114/0x730 net/netlink/af_netlink.c:1989
 sock_recvmsg_nosec net/socket.c:1017 [inline]
 sock_recvmsg net/socket.c:1038 [inline]
 ____sys_recvmsg+0x156/0x310 net/socket.c:2720
 ___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: 0x0000000000000000 -> 0x0000000000001000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 23037 Comm: syz-executor.2 Not tainted 6.3.0-rc4-syzkaller-00195-g5a57b48fdfcb #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/04/01 04:58 upstream 5a57b48fdfcb f325deb0 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
2023/03/16 10:10 upstream 9c1bec9c0b08 18b58603 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in netlink_recvmsg / netlink_recvmsg
* Struck through repros no longer work on HEAD.