syzbot


KCSAN: data-race in virtqueue_enable_cb_delayed / vring_interrupt (2)

Status: auto-closed as invalid on 2022/01/03 20:21
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 393d, last: 361d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in virtqueue_enable_cb_delayed / vring_interrupt 1 451d 451d 0/24 auto-closed as invalid on 2021/10/06 12:11

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

write to 0xffff888102a577ca of 1 bytes by interrupt on cpu 1:
 vring_interrupt+0x132/0x180 drivers/virtio/virtio_ring.c:2159
 __handle_irq_event_percpu+0x93/0x480 kernel/irq/handle.c:158
 handle_irq_event_percpu kernel/irq/handle.c:198 [inline]
 handle_irq_event+0x9a/0x150 kernel/irq/handle.c:215
 handle_edge_irq+0x18e/0x5f0 kernel/irq/chip.c:822
 generic_handle_irq_desc include/linux/irqdesc.h:158 [inline]
 handle_irq arch/x86/kernel/irq.c:231 [inline]
 __common_interrupt+0x60/0x100 arch/x86/kernel/irq.c:250
 common_interrupt+0x9a/0xc0 arch/x86/kernel/irq.c:240
 asm_common_interrupt+0x1e/0x40
 check_access kernel/kcsan/core.c:638 [inline]
 __tsan_read8+0x10c/0x180 kernel/kcsan/core.c:864
 __fput+0x3a/0x520 fs/file_table.c:257
 ____fput+0x11/0x20 fs/file_table.c:313
 task_work_run+0x8e/0x110 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:175 [inline]
 exit_to_user_mode_prepare+0x160/0x190 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:300
 do_syscall_64+0x50/0xd0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888102a577ca of 1 bytes by task 1771 on cpu 0:
 virtqueue_enable_cb_delayed+0x1f/0x3b0 drivers/virtio/virtio_ring.c:2115
 start_xmit+0xef/0xb20 drivers/net/virtio_net.c:1715
 __netdev_start_xmit include/linux/netdevice.h:4987 [inline]
 netdev_start_xmit include/linux/netdevice.h:5001 [inline]
 xmit_one+0x105/0x2f0 net/core/dev.c:3590
 dev_hard_start_xmit+0x72/0x120 net/core/dev.c:3606
 sch_direct_xmit+0x1b2/0x7c0 net/sched/sch_generic.c:342
 __dev_xmit_skb+0x83d/0x1370 net/core/dev.c:3817
 __dev_queue_xmit+0x590/0xf70 net/core/dev.c:4194
 dev_queue_xmit+0x13/0x20 net/core/dev.c:4259
 neigh_hh_output include/net/neighbour.h:511 [inline]
 neigh_output include/net/neighbour.h:525 [inline]
 ip_finish_output2+0x705/0xb40 net/ipv4/ip_output.c:221
 ip_finish_output+0xfb/0x240 net/ipv4/ip_output.c:309
 NF_HOOK_COND include/linux/netfilter.h:296 [inline]
 ip_output+0xf3/0x1a0 net/ipv4/ip_output.c:423
 dst_output include/net/dst.h:450 [inline]
 ip_local_out net/ipv4/ip_output.c:126 [inline]
 __ip_queue_xmit+0xa1a/0xa40 net/ipv4/ip_output.c:525
 ip_queue_xmit+0x34/0x40 net/ipv4/ip_output.c:539
 __tcp_transmit_skb+0x132a/0x1840 net/ipv4/tcp_output.c:1402
 tcp_transmit_skb net/ipv4/tcp_output.c:1420 [inline]
 tcp_write_xmit+0x1450/0x4460 net/ipv4/tcp_output.c:2680
 __tcp_push_pending_frames+0x68/0x1c0 net/ipv4/tcp_output.c:2864
 tcp_push+0x2d9/0x2f0 net/ipv4/tcp.c:725
 tcp_sendmsg_locked+0x1cb0/0x25a0 net/ipv4/tcp.c:1412
 tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1440
 inet_sendmsg+0x5f/0x80 net/ipv4/af_inet.c:819
 sock_sendmsg_nosec net/socket.c:704 [inline]
 sock_sendmsg net/socket.c:724 [inline]
 sock_write_iter+0x1a3/0x200 net/socket.c:1057
 call_write_iter include/linux/fs.h:2162 [inline]
 new_sync_write fs/read_write.c:503 [inline]
 vfs_write+0x7f5/0x950 fs/read_write.c:590
 ksys_write+0xd9/0x190 fs/read_write.c:643
 __do_sys_write fs/read_write.c:655 [inline]
 __se_sys_write fs/read_write.c:652 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:652
 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: 0x00 -> 0x01

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

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/11/29 20:17 upstream d58071a8a76d d0830353 .config log report info KCSAN: data-race in virtqueue_enable_cb_delayed / vring_interrupt
ci2-upstream-kcsan-gce 2021/11/13 18:35 upstream 66f4beaa6c1d 75b04091 .config log report info KCSAN: data-race in virtqueue_enable_cb_delayed / vring_interrupt
ci2-upstream-kcsan-gce 2021/11/11 18:50 upstream debe436e77c7 75b04091 .config log report info KCSAN: data-race in virtqueue_enable_cb_delayed / vring_interrupt
ci2-upstream-kcsan-gce 2021/10/29 11:48 upstream f25a5481af12 2353a3ec .config log report info KCSAN: data-race in virtqueue_enable_cb_delayed / vring_interrupt
* Struck through repros no longer work on HEAD.