syzbot


KCSAN: data-race in virtnet_poll / virtnet_stats

Status: auto-closed as invalid on 2022/01/25 00:43
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 347d, last: 347d

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

write to 0xffff888101cf21a8 of 8 bytes by interrupt on cpu 0:
 virtnet_receive drivers/net/virtio_net.c:1463 [inline]
 virtnet_poll+0x578/0x980 drivers/net/virtio_net.c:1550
 __napi_poll+0x65/0x3f0 net/core/dev.c:7023
 napi_poll net/core/dev.c:7090 [inline]
 net_rx_action+0x29e/0x650 net/core/dev.c:7177
 __do_softirq+0x158/0x2de kernel/softirq.c:558
 __irq_exit_rcu kernel/softirq.c:637 [inline]
 irq_exit_rcu+0x37/0x70 kernel/softirq.c:649
 common_interrupt+0x9f/0xc0 arch/x86/kernel/irq.c:240
 asm_common_interrupt+0x1e/0x40
 write_comp_data kernel/kcov.c:243 [inline]
 __sanitizer_cov_trace_cmp8+0x8c/0x90 kernel/kcov.c:267
 _copy_to_iter+0x1cd/0xbe0 lib/iov_iter.c:667
 copy_to_iter include/linux/uio.h:155 [inline]
 simple_copy_to_iter+0x4c/0x60 net/core/datagram.c:519
 __skb_datagram_iter+0xac/0x520 net/core/datagram.c:425
 skb_copy_datagram_iter+0x36/0xf0 net/core/datagram.c:533
 skb_copy_datagram_msg include/linux/skbuff.h:3657 [inline]
 __unix_dgram_recvmsg+0x52d/0x8c0 net/unix/af_unix.c:2342
 unix_dgram_recvmsg+0x81/0x90 net/unix/af_unix.c:2401
 sock_recvmsg_nosec net/socket.c:944 [inline]
 sock_recvmsg net/socket.c:962 [inline]
 sock_read_iter+0x19d/0x1e0 net/socket.c:1035
 call_read_iter include/linux/fs.h:2156 [inline]
 new_sync_read fs/read_write.c:400 [inline]
 vfs_read+0x66c/0x750 fs/read_write.c:481
 ksys_read+0xd9/0x190 fs/read_write.c:619
 __do_sys_read fs/read_write.c:629 [inline]
 __se_sys_read fs/read_write.c:627 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:627
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888101cf21a8 of 8 bytes by task 1474 on cpu 1:
 virtnet_stats+0x1bb/0x350 drivers/net/virtio_net.c:1891
 dev_get_stats+0x65/0x180 net/core/dev.c:10691
 rtnl_fill_stats+0x45/0x320 net/core/rtnetlink.c:1202
 rtnl_fill_ifinfo+0xebf/0x2560 net/core/rtnetlink.c:1774
 rtnl_dump_ifinfo+0x893/0xce0 net/core/rtnetlink.c:2138
 netlink_dump+0x364/0x6b0 net/netlink/af_netlink.c:2270
 netlink_recvmsg+0x486/0x810 net/netlink/af_netlink.c:2004
 ____sys_recvmsg+0x16c/0x320
 ___sys_recvmsg net/socket.c:2670 [inline]
 __sys_recvmsg+0x209/0x3f0 net/socket.c:2700
 __do_sys_recvmsg net/socket.c:2710 [inline]
 __se_sys_recvmsg net/socket.c:2707 [inline]
 __x64_sys_recvmsg+0x42/0x50 net/socket.c:2707
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x000000000020f2e6 -> 0x000000000020f328

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 1474 Comm: dhcpcd Not tainted 5.16.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/12/21 00:36 upstream 86085fe79e3c 62bd192b .config log report info KCSAN: data-race in virtnet_poll / virtnet_stats
* Struck through repros no longer work on HEAD.