syzbot


KCSAN: data-race in free_old_xmit_skbs / virtnet_stats (3)

Status: auto-obsoleted due to no activity on 2023/08/22 14:25
Subsystems: net virt
[Documentation on labels]
First crash: 284d, last: 284d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in free_old_xmit_skbs / virtnet_stats net virt 3 854d 863d 0/26 auto-closed as invalid on 2022/01/30 06:15
upstream KCSAN: data-race in free_old_xmit_skbs / virtnet_stats (2) net virt 1 587d 587d 0/26 auto-obsoleted due to no activity on 2022/10/24 03:10

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

read-write to 0xffff8881032b56b0 of 8 bytes by interrupt on cpu 1:
 free_old_xmit_skbs+0x1ac/0x1f0 drivers/net/virtio_net.c:597
 virtnet_poll_tx+0x147/0x2c0 drivers/net/virtio_net.c:2061
 __napi_poll+0x60/0x3b0 net/core/dev.c:6460
 napi_poll net/core/dev.c:6527 [inline]
 net_rx_action+0x32b/0x750 net/core/dev.c:6660
 __do_softirq+0xc1/0x265 kernel/softirq.c:553
 invoke_softirq kernel/softirq.c:427 [inline]
 __irq_exit_rcu kernel/softirq.c:632 [inline]
 irq_exit_rcu+0x3b/0x90 kernel/softirq.c:644
 common_interrupt+0x7f/0x90 arch/x86/kernel/irq.c:247
 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:636
 tcp_v4_send_check+0x0/0x170 include/linux/skbuff.h:2866
 __tcp_transmit_skb+0xd54/0x1710 net/ipv4/tcp_output.c:1370
 tcp_transmit_skb net/ipv4/tcp_output.c:1419 [inline]
 tcp_write_xmit+0x112b/0x2ed0 net/ipv4/tcp_output.c:2735
 __tcp_push_pending_frames+0x6a/0x1a0 net/ipv4/tcp_output.c:2919
 tcp_push+0x320/0x330 net/ipv4/tcp.c:734
 tcp_sendmsg_locked+0x215f/0x2650 net/ipv4/tcp.c:1301
 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1333
 inet_sendmsg+0x63/0x80 net/ipv4/af_inet.c:830
 sock_sendmsg_nosec net/socket.c:725 [inline]
 sock_sendmsg net/socket.c:748 [inline]
 sock_write_iter+0x1aa/0x230 net/socket.c:1129
 call_write_iter include/linux/fs.h:1871 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x4ab/0x7d0 fs/read_write.c:584
 ksys_write+0xeb/0x1a0 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:646
 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

read to 0xffff8881032b56b0 of 8 bytes by task 2805 on cpu 0:
 virtnet_stats+0x141/0x340 drivers/net/virtio_net.c:2368
 dev_get_stats+0x6d/0x860 net/core/dev.c:10424
 rtnl_fill_stats+0x45/0x320 net/core/rtnetlink.c:1261
 rtnl_fill_ifinfo+0xd0e/0x1120 net/core/rtnetlink.c:1868
 rtnl_dump_ifinfo+0x7f9/0xc20 net/core/rtnetlink.c:2241
 netlink_dump+0x381/0x710 net/netlink/af_netlink.c:2269
 netlink_recvmsg+0x420/0x770 net/netlink/af_netlink.c:1996
 sock_recvmsg_nosec net/socket.c:1020 [inline]
 sock_recvmsg net/socket.c:1041 [inline]
 ____sys_recvmsg+0x156/0x310 net/socket.c:2713
 ___sys_recvmsg net/socket.c:2755 [inline]
 __sys_recvmsg+0x1ea/0x270 net/socket.c:2785
 __do_sys_recvmsg net/socket.c:2795 [inline]
 __se_sys_recvmsg net/socket.c:2792 [inline]
 __x64_sys_recvmsg+0x46/0x50 net/socket.c:2792
 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: 0x0000000000005bc5 -> 0x0000000000005bc6

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 2805 Comm: dhcpcd Not tainted 6.5.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/07/18 14:17 upstream fdf0eaf11452 022df2bb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in free_old_xmit_skbs / virtnet_stats
* Struck through repros no longer work on HEAD.