syzbot


KCSAN: data-race in virtqueue_enable_cb_delayed / vring_interrupt

Status: auto-closed as invalid on 2021/10/06 12:11
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 457d, last: 457d
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 (2) 4 368d 399d 0/24 auto-closed as invalid on 2022/01/03 20:21

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

write to 0xffff88810294928a of 1 bytes by interrupt on cpu 0:
 vring_interrupt+0x132/0x180 drivers/virtio/virtio_ring.c:2151
 __handle_irq_event_percpu+0x93/0x3f0 kernel/irq/handle.c:156
 handle_irq_event_percpu kernel/irq/handle.c:196 [inline]
 handle_irq_event+0xb6/0x170 kernel/irq/handle.c:213
 handle_edge_irq+0x17e/0x600 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+0x38/0xb0 arch/x86/kernel/irq.c:250
 common_interrupt+0x39/0x90 arch/x86/kernel/irq.c:240
 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:629

read to 0xffff88810294928a of 1 bytes by task 1750 on cpu 1:
 virtqueue_enable_cb_delayed+0x1f/0x3b0 drivers/virtio/virtio_ring.c:2107
 start_xmit+0xe3/0xb10 drivers/net/virtio_net.c:1704
 __netdev_start_xmit include/linux/netdevice.h:4944 [inline]
 netdev_start_xmit include/linux/netdevice.h:4958 [inline]
 xmit_one+0xf9/0x270 net/core/dev.c:3659
 dev_hard_start_xmit+0x72/0x120 net/core/dev.c:3675
 sch_direct_xmit+0x1a8/0x5c0 net/sched/sch_generic.c:342
 __dev_xmit_skb+0x938/0x1420 net/core/dev.c:3886
 __dev_queue_xmit+0x45c/0xa50 net/core/dev.c:4253
 dev_queue_xmit+0x13/0x20 net/core/dev.c:4318
 neigh_hh_output include/net/neighbour.h:499 [inline]
 neigh_output include/net/neighbour.h:508 [inline]
 ip_finish_output2+0xa93/0xb10 net/ipv4/ip_output.c:230
 __ip_finish_output net/ipv4/ip_output.c:252 [inline]
 ip_finish_output+0x2fa/0x490 net/ipv4/ip_output.c:318
 NF_HOOK_COND include/linux/netfilter.h:296 [inline]
 ip_output+0xf3/0x1a0 net/ipv4/ip_output.c:432
 dst_output include/net/dst.h:448 [inline]
 ip_local_out+0x164/0x220 net/ipv4/ip_output.c:126
 __ip_queue_xmit+0x97f/0x9a0 net/ipv4/ip_output.c:533
 ip_queue_xmit+0x34/0x40 net/ipv4/ip_output.c:547
 __tcp_transmit_skb+0x140a/0x19d0 net/ipv4/tcp_output.c:1405
 tcp_transmit_skb net/ipv4/tcp_output.c:1423 [inline]
 tcp_write_xmit+0x110a/0x3b90 net/ipv4/tcp_output.c:2690
 __tcp_push_pending_frames+0x68/0x1c0 net/ipv4/tcp_output.c:2874
 tcp_push+0x2d9/0x2f0 net/ipv4/tcp.c:736
 tcp_sendmsg_locked+0x1c45/0x24b0 net/ipv4/tcp.c:1431
 tcp_sendmsg+0x2c/0x40 net/ipv4/tcp.c:1461
 inet_sendmsg+0x5f/0x80 net/ipv4/af_inet.c:821
 sock_sendmsg_nosec net/socket.c:703 [inline]
 sock_sendmsg net/socket.c:723 [inline]
 sock_write_iter+0x1a4/0x200 net/socket.c:1056
 call_write_iter include/linux/fs.h:2157 [inline]
 new_sync_write fs/read_write.c:507 [inline]
 vfs_write+0x77d/0x8c0 fs/read_write.c:594
 ksys_write+0xce/0x180 fs/read_write.c:647
 __do_sys_write fs/read_write.c:659 [inline]
 __se_sys_write fs/read_write.c:656 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:656
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 1750 Comm: sshd Not tainted 5.14.0-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/09/01 12:10 upstream b91db6a0b52e 7eb7e152 .config log report info KCSAN: data-race in virtqueue_enable_cb_delayed / vring_interrupt
* Struck through repros no longer work on HEAD.