syzbot


KCSAN: data-race in virtqueue_get_buf_ctx / vring_interrupt (4)

Status: auto-closed as invalid on 2022/05/27 01:16
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 225d, last: 225d
similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in virtqueue_get_buf_ctx / vring_interrupt 3 1124d 1134d 0/24 closed as invalid on 2019/11/19 13:44
upstream KCSAN: data-race in virtqueue_get_buf_ctx / vring_interrupt (5) 1 147d 147d 0/24 auto-closed as invalid on 2022/08/13 10:50
upstream KCSAN: data-race in virtqueue_get_buf_ctx / vring_interrupt (2) 4 1028d 1053d 0/24 auto-closed as invalid on 2020/04/19 05:34
upstream KCSAN: data-race in virtqueue_get_buf_ctx / vring_interrupt (3) 1 410d 410d 0/24 auto-closed as invalid on 2021/11/23 01:54

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

read-write to 0xffff888102762048 of 2 bytes by task 1803 on cpu 1:
 virtqueue_get_buf_ctx_split drivers/virtio/virtio_ring.c:783 [inline]
 virtqueue_get_buf_ctx+0x3a9/0x5b0 drivers/virtio/virtio_ring.c:1983
 virtqueue_get_buf+0x1b/0x20 drivers/virtio/virtio_ring.c:1989
 free_old_xmit_skbs+0x50/0x180 drivers/net/virtio_net.c:1536
 start_xmit+0xdb/0xaf0 drivers/net/virtio_net.c:1768
 __netdev_start_xmit include/linux/netdevice.h:4778 [inline]
 netdev_start_xmit include/linux/netdevice.h:4792 [inline]
 xmit_one+0x105/0x2f0 net/core/dev.c:3532
 dev_hard_start_xmit+0x72/0x120 net/core/dev.c:3548
 sch_direct_xmit+0x1ac/0x580 net/sched/sch_generic.c:342
 __dev_xmit_skb+0x808/0xdb0 net/core/dev.c:3759
 __dev_queue_xmit+0x569/0xf00 net/core/dev.c:4141
 dev_queue_xmit+0x13/0x20 net/core/dev.c:4209
 neigh_hh_output include/net/neighbour.h:533 [inline]
 neigh_output include/net/neighbour.h:547 [inline]
 ip_finish_output2+0x709/0x850 net/ipv4/ip_output.c:228
 ip_finish_output+0xf3/0x250 net/ipv4/ip_output.c:316
 NF_HOOK_COND include/linux/netfilter.h:296 [inline]
 ip_output+0xf3/0x1a0 net/ipv4/ip_output.c:430
 dst_output include/net/dst.h:451 [inline]
 ip_local_out net/ipv4/ip_output.c:126 [inline]
 __ip_queue_xmit+0xa2e/0xa50 net/ipv4/ip_output.c:532
 ip_queue_xmit+0x34/0x40 net/ipv4/ip_output.c:546
 __tcp_transmit_skb+0x12a8/0x1790 net/ipv4/tcp_output.c:1402
 __tcp_send_ack+0x1dc/0x2e0 net/ipv4/tcp_output.c:3970
 tcp_send_ack+0x23/0x30 net/ipv4/tcp_output.c:3976
 tcp_cleanup_rbuf+0x1c7/0x310 net/ipv4/tcp.c:1589
 tcp_recvmsg_locked+0x1139/0x1550 net/ipv4/tcp.c:2544
 tcp_recvmsg+0x16a/0x4e0 net/ipv4/tcp.c:2574
 inet_recvmsg+0xa3/0x210 net/ipv4/af_inet.c:850
 sock_recvmsg_nosec net/socket.c:948 [inline]
 sock_recvmsg net/socket.c:966 [inline]
 sock_read_iter+0x19d/0x1e0 net/socket.c:1039
 call_read_iter include/linux/fs.h:2044 [inline]
 new_sync_read fs/read_write.c:401 [inline]
 vfs_read+0x5a5/0x6a0 fs/read_write.c:482
 ksys_read+0xe8/0x1a0 fs/read_write.c:620
 __do_sys_read fs/read_write.c:630 [inline]
 __se_sys_read fs/read_write.c:628 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:628
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888102762048 of 2 bytes by interrupt on cpu 0:
 vring_interrupt+0x33/0x180 drivers/virtio/virtio_ring.c:2134
 __handle_irq_event_percpu+0x92/0x400 kernel/irq/handle.c:158
 handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
 handle_irq_event+0x60/0xf0 kernel/irq/handle.c:210
 handle_edge_irq+0x17e/0x5a0 kernel/irq/chip.c:817
 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
 native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
 arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
 acpi_safe_halt drivers/acpi/processor_idle.c:115 [inline]
 acpi_idle_do_entry drivers/acpi/processor_idle.c:556 [inline]
 acpi_idle_enter+0x27b/0x300 drivers/acpi/processor_idle.c:691
 cpuidle_enter_state+0x2ee/0x7a0 drivers/cpuidle/cpuidle.c:237
 cpuidle_enter+0x3c/0x60 drivers/cpuidle/cpuidle.c:351
 call_cpuidle kernel/sched/idle.c:155 [inline]
 cpuidle_idle_call kernel/sched/idle.c:236 [inline]
 do_idle+0x1b2/0x250 kernel/sched/idle.c:303
 cpu_startup_entry+0x15/0x20 kernel/sched/idle.c:400
 rest_init+0xed/0xf0 init/main.c:726
 arch_call_rest_init+0xa/0xb init/main.c:882
 start_kernel+0x5e4/0x669 init/main.c:1140
 secondary_startup_64_no_verify+0xc4/0xcb

value changed: 0x0d01 -> 0x0d02

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.18.0-rc3-syzkaller-00060-g59f0c2447e25-dirty #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 2022/04/22 01:14 upstream 59f0c2447e25 2738b391 .config log report info KCSAN: data-race in virtqueue_get_buf_ctx / vring_interrupt
* Struck through repros no longer work on HEAD.