syzbot


KCSAN: data-race in virtqueue_disable_cb / virtqueue_disable_cb (4)

Status: moderation: reported on 2024/06/19 12:13
Subsystems: virt
[Documentation on labels]
Reported-by: syzbot+192d1245cb1d0cb43484@syzkaller.appspotmail.com
First crash: 29d, last: 1d15h
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in virtqueue_disable_cb / virtqueue_disable_cb virt 47 266d 448d 0/27 auto-obsoleted due to no activity on 2023/11/30 12:57
upstream KCSAN: data-race in virtqueue_disable_cb / virtqueue_disable_cb (2) virt 3 173d 200d 0/27 auto-obsoleted due to no activity on 2024/03/02 22:45
upstream KCSAN: data-race in virtqueue_disable_cb / virtqueue_disable_cb (3) virt 37 58d 114d 0/27 auto-obsoleted due to no activity on 2024/06/18 13:46

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

write to 0xffff888101e46178 of 2 bytes by interrupt on cpu 0:
 virtqueue_disable_cb_split drivers/virtio/virtio_ring.c:886 [inline]
 virtqueue_disable_cb+0x85/0x180 drivers/virtio/virtio_ring.c:2446
 skb_xmit_done+0x5f/0x140 drivers/net/virtio_net.c:673
 vring_interrupt+0x157/0x180 drivers/virtio/virtio_ring.c:2595
 __handle_irq_event_percpu+0x95/0x490 kernel/irq/handle.c:158
 handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
 handle_irq_event+0x64/0xf0 kernel/irq/handle.c:210
 handle_edge_irq+0x16d/0x5b0 kernel/irq/chip.c:831
 generic_handle_irq_desc include/linux/irqdesc.h:173 [inline]
 handle_irq arch/x86/kernel/irq.c:247 [inline]
 call_irq_handler arch/x86/kernel/irq.c:259 [inline]
 __common_interrupt+0x58/0xe0 arch/x86/kernel/irq.c:285
 common_interrupt+0x7c/0x90 arch/x86/kernel/irq.c:278
 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
 finish_task_switch+0xbf/0x2b0 kernel/sched/core.c:5062
 schedule_tail+0xa/0x50 kernel/sched/core.c:5119
 ret_from_fork+0x24/0x60 arch/x86/kernel/process.c:143
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff888101e46178 of 2 bytes by task 3023 on cpu 1:
 virtqueue_disable_cb_split drivers/virtio/virtio_ring.c:885 [inline]
 virtqueue_disable_cb+0x63/0x180 drivers/virtio/virtio_ring.c:2446
 start_xmit+0x125/0xb70 drivers/net/virtio_net.c:2586
 __netdev_start_xmit include/linux/netdevice.h:4882 [inline]
 netdev_start_xmit include/linux/netdevice.h:4896 [inline]
 xmit_one net/core/dev.c:3578 [inline]
 dev_hard_start_xmit+0x119/0x3f0 net/core/dev.c:3594
 sch_direct_xmit+0x1b0/0x580 net/sched/sch_generic.c:343
 __dev_xmit_skb net/core/dev.c:3807 [inline]
 __dev_queue_xmit+0xee7/0x1e50 net/core/dev.c:4359
 dev_queue_xmit include/linux/netdevice.h:3095 [inline]
 neigh_hh_output include/net/neighbour.h:526 [inline]
 neigh_output include/net/neighbour.h:540 [inline]
 ip_finish_output2+0x73b/0x8b0 net/ipv4/ip_output.c:235
 ip_finish_output+0x11a/0x2a0 net/ipv4/ip_output.c:323
 NF_HOOK_COND include/linux/netfilter.h:303 [inline]
 ip_output+0xab/0x170 net/ipv4/ip_output.c:433
 dst_output include/net/dst.h:450 [inline]
 ip_local_out net/ipv4/ip_output.c:129 [inline]
 __ip_queue_xmit+0xbca/0xbf0 net/ipv4/ip_output.c:535
 ip_queue_xmit+0x38/0x50 net/ipv4/ip_output.c:549
 __tcp_transmit_skb+0x15b0/0x1970 net/ipv4/tcp_output.c:1466
 tcp_transmit_skb net/ipv4/tcp_output.c:1484 [inline]
 tcp_write_xmit+0x1273/0x31c0 net/ipv4/tcp_output.c:2829
 __tcp_push_pending_frames+0x6a/0x1a0 net/ipv4/tcp_output.c:3014
 tcp_push_pending_frames include/net/tcp.h:2102 [inline]
 tcp_data_snd_check net/ipv4/tcp_input.c:5693 [inline]
 tcp_rcv_established+0xa0f/0xef0 net/ipv4/tcp_input.c:6121
 tcp_v4_do_rcv+0x65f/0x740 net/ipv4/tcp_ipv4.c:1909
 sk_backlog_rcv+0x7a/0x1a0 include/net/sock.h:1106
 __release_sock+0xbb/0x140 net/core/sock.c:2983
 release_sock+0x44/0x150 net/core/sock.c:3549
 tcp_recvmsg+0x147/0x490 net/ipv4/tcp.c:2591
 inet_recvmsg+0xbd/0x290 net/ipv4/af_inet.c:885
 sock_recvmsg_nosec net/socket.c:1046 [inline]
 sock_recvmsg+0xfe/0x170 net/socket.c:1068
 sock_read_iter+0x152/0x1a0 net/socket.c:1138
 new_sync_read fs/read_write.c:395 [inline]
 vfs_read+0x5e9/0x6e0 fs/read_write.c:476
 ksys_read+0xeb/0x1b0 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+0x42/0x50 fs/read_write.c:627
 x64_sys_call+0x27d3/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:1
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0000 -> 0x0001

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3023 Comm: syz-executor Not tainted 6.10.0-syzkaller-02711-g0434dbe32053 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/17 15:47 upstream 0434dbe32053 215bec2d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in virtqueue_disable_cb / virtqueue_disable_cb
2024/06/19 12:12 upstream 92e5605a199e 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in virtqueue_disable_cb / virtqueue_disable_cb
* Struck through repros no longer work on HEAD.