syzbot


KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (3)

Status: auto-obsoleted due to no activity on 2024/09/06 16:53
Subsystems: virt
[Documentation on labels]
Reported-by: syzbot+1fab38aee34d5e513ca4@syzkaller.appspotmail.com
First crash: 77d, last: 47d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (4) virt 1 7d09h 7d04h 0/28 upstream: reported on 2024/09/12 08:11
upstream KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (2) virt 25 120d 283d 0/28 auto-obsoleted due to no activity on 2024/06/26 00:26
upstream KCSAN: data-race in virtqueue_disable_cb / vring_interrupt virt 130 391d 878d 0/28 auto-obsoleted due to no activity on 2023/09/29 09:42

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

write to 0xffff888102213452 of 1 bytes by interrupt on cpu 0:
 vring_interrupt+0x12b/0x180 drivers/virtio/virtio_ring.c:2591
 __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+0x3e/0x90 arch/x86/kernel/irq.c:278
 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
 preempt_count arch/x86/include/asm/preempt.h:26 [inline]
 get_ctx kernel/kcsan/core.c:206 [inline]
 check_access kernel/kcsan/core.c:750 [inline]
 __tsan_read4+0xba/0x180 kernel/kcsan/core.c:1024
 fib6_check_expired include/net/ip6_fib.h:270 [inline]
 __find_rr_leaf+0xbc/0x4c0 net/ipv6/route.c:806
 find_rr_leaf net/ipv6/route.c:853 [inline]
 rt6_select net/ipv6/route.c:897 [inline]
 fib6_table_lookup+0x1ed/0x650 net/ipv6/route.c:2195
 ip6_pol_route+0xb9/0xb90 net/ipv6/route.c:2231
 ip6_pol_route_input+0x40/0x50 net/ipv6/route.c:2288
 pol_lookup_func include/net/ip6_fib.h:616 [inline]
 fib6_rule_lookup+0x364/0x4e0 net/ipv6/fib6_rules.c:116
 ip6_route_input_lookup net/ipv6/route.c:2300 [inline]
 ip6_route_input+0x41e/0x4f0 net/ipv6/route.c:2596
 ip6_rcv_finish_core net/ipv6/ip6_input.c:66 [inline]
 ip6_rcv_finish+0x1c0/0x330 net/ipv6/ip6_input.c:77
 ip_sabotage_in+0x139/0x150 net/bridge/br_netfilter_hooks.c:1008
 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline]
 nf_hook_slow+0x86/0x1b0 net/netfilter/core.c:626
 nf_hook include/linux/netfilter.h:269 [inline]
 NF_HOOK include/linux/netfilter.h:312 [inline]
 ipv6_rcv+0x113/0x150 net/ipv6/ip6_input.c:310
 __netif_receive_skb_one_core net/core/dev.c:5661 [inline]
 __netif_receive_skb+0xa2/0x280 net/core/dev.c:5775
 netif_receive_skb_internal net/core/dev.c:5861 [inline]
 netif_receive_skb+0x4a/0x320 net/core/dev.c:5921
 br_netif_receive_skb net/bridge/br_input.c:30 [inline]
 NF_HOOK include/linux/netfilter.h:314 [inline]
 br_pass_frame_up+0x239/0x310 net/bridge/br_input.c:70
 br_handle_frame_finish+0xd28/0xe70
 br_nf_hook_thresh+0x1e5/0x220
 br_nf_pre_routing_finish_ipv6+0x575/0x5a0
 NF_HOOK include/linux/netfilter.h:314 [inline]
 br_nf_pre_routing_ipv6+0x1f6/0x2a0 net/bridge/br_netfilter_ipv6.c:184
 br_nf_pre_routing+0x517/0xbc0 net/bridge/br_netfilter_hooks.c:531
 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline]
 nf_hook_bridge_pre net/bridge/br_input.c:277 [inline]
 br_handle_frame+0x4dd/0x9a0 net/bridge/br_input.c:424
 __netif_receive_skb_core+0xb00/0x2310 net/core/dev.c:5555
 __netif_receive_skb_one_core net/core/dev.c:5659 [inline]
 __netif_receive_skb+0x5a/0x280 net/core/dev.c:5775
 process_backlog+0x22e/0x440 net/core/dev.c:6108
 __napi_poll+0x63/0x3c0 net/core/dev.c:6772
 napi_poll net/core/dev.c:6841 [inline]
 net_rx_action+0x3a1/0x7f0 net/core/dev.c:6963
 handle_softirqs+0xc3/0x280 kernel/softirq.c:554
 do_softirq+0x5e/0x90 kernel/softirq.c:455
 __local_bh_enable_ip+0x6e/0x70 kernel/softirq.c:382
 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:167 [inline]
 _raw_spin_unlock_bh+0x36/0x40 kernel/locking/spinlock.c:210
 spin_unlock_bh include/linux/spinlock.h:396 [inline]
 ptr_ring_consume_bh include/linux/ptr_ring.h:367 [inline]
 wg_packet_decrypt_worker+0x6ac/0x6f0 drivers/net/wireguard/receive.c:499
 process_one_work kernel/workqueue.c:3231 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3312
 worker_thread+0x526/0x700 kernel/workqueue.c:3390
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff888102213452 of 1 bytes by task 3249 on cpu 1:
 virtqueue_disable_cb_split drivers/virtio/virtio_ring.c:892 [inline]
 virtqueue_disable_cb+0x92/0x180 drivers/virtio/virtio_ring.c:2446
 start_xmit+0x14b/0x1260 drivers/net/virtio_net.c:3034
 __netdev_start_xmit include/linux/netdevice.h:4913 [inline]
 netdev_start_xmit include/linux/netdevice.h:4922 [inline]
 xmit_one net/core/dev.c:3580 [inline]
 dev_hard_start_xmit+0x119/0x3f0 net/core/dev.c:3596
 sch_direct_xmit+0x1b0/0x580 net/sched/sch_generic.c:343
 __dev_xmit_skb net/core/dev.c:3809 [inline]
 __dev_queue_xmit+0xf3d/0x1fe0 net/core/dev.c:4389
 dev_queue_xmit include/linux/netdevice.h:3105 [inline]
 neigh_hh_output include/net/neighbour.h:526 [inline]
 neigh_output include/net/neighbour.h:540 [inline]
 ip_finish_output2+0x73d/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+0xbcc/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+0x320/0x340 net/ipv4/tcp.c:747
 tcp_sendmsg_locked+0x2127/0x2640 net/ipv4/tcp.c:1322
 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1354
 inet_sendmsg+0x77/0xd0 net/ipv4/af_inet.c:853
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x102/0x180 net/socket.c:745
 sock_write_iter+0x164/0x1b0 net/socket.c:1160
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0x78f/0x900 fs/read_write.c:590
 ksys_write+0xeb/0x1b0 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+0x42/0x50 fs/read_write.c:652
 x64_sys_call+0x2a40/0x2e00 arch/x86/include/generated/asm/syscalls_64.h:2
 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: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3249 Comm: syz-executor Not tainted 6.11.0-rc1-syzkaller-00154-gc0ecd6388360 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/02 16:52 upstream c0ecd6388360 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in virtqueue_disable_cb / vring_interrupt
2024/07/04 08:50 upstream 795c58e4c7fc 3f2748a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in virtqueue_disable_cb / vring_interrupt
* Struck through repros no longer work on HEAD.