syzbot


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

Status: upstream: reported on 2024/10/22 10:07
Subsystems: virt
[Documentation on labels]
Reported-by: syzbot+9d46c74b27b961b244a9@syzkaller.appspotmail.com
First crash: 62d, last: 2d10h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [virt?] KCSAN: data-race in virtqueue_disable_cb / virtqueue_disable_cb (5) 1 (2) 2024/10/23 03:31
Similar bugs (4)
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 391d 573d 0/28 auto-obsoleted due to no activity on 2023/11/30 12:57
upstream KCSAN: data-race in virtqueue_disable_cb / virtqueue_disable_cb (4) virt 3 118d 154d 0/28 auto-obsoleted due to no activity on 2024/08/29 17:45
upstream KCSAN: data-race in virtqueue_disable_cb / virtqueue_disable_cb (2) virt 3 298d 325d 0/28 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 183d 239d 0/28 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

read to 0xffff888102f82278 of 2 bytes by interrupt 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
 skb_xmit_done+0x5f/0x140 drivers/net/virtio_net.c:735
 vring_interrupt+0x161/0x190 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
 kcsan_setup_watchpoint+0x404/0x410 kernel/kcsan/core.c:705
 __get_vma_policy mm/mempolicy.c:1799 [inline]
 get_vma_policy mm/mempolicy.c:1823 [inline]
 vma_alloc_folio_noprof+0x5f/0x2f0 mm/mempolicy.c:2313
 alloc_anon_folio mm/memory.c:4727 [inline]
 do_anonymous_page mm/memory.c:4784 [inline]
 do_pte_missing mm/memory.c:3963 [inline]
 handle_pte_fault mm/memory.c:5766 [inline]
 __handle_mm_fault mm/memory.c:5909 [inline]
 handle_mm_fault+0xdbe/0x2aa0 mm/memory.c:6077
 do_user_addr_fault arch/x86/mm/fault.c:1389 [inline]
 handle_page_fault arch/x86/mm/fault.c:1481 [inline]
 exc_page_fault+0x296/0x650 arch/x86/mm/fault.c:1539
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
 rep_stos_alternative+0x40/0x80 arch/x86/lib/clear_page_64.S:92
 __clear_user arch/x86/include/asm/uaccess_64.h:188 [inline]
 clear_user arch/x86/include/asm/uaccess_64.h:205 [inline]
 read_zero+0x77/0x170 drivers/char/mem.c:504
 vfs_read+0x1a2/0x700 fs/read_write.c:567
 ksys_read+0xeb/0x1b0 fs/read_write.c:712
 __do_sys_read fs/read_write.c:722 [inline]
 __se_sys_read fs/read_write.c:720 [inline]
 __x64_sys_read+0x42/0x50 fs/read_write.c:720
 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

write to 0xffff888102f82278 of 2 bytes by task 3303 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
 start_xmit+0x14b/0x1280 drivers/net/virtio_net.c:3087
 __netdev_start_xmit include/linux/netdevice.h:4928 [inline]
 netdev_start_xmit include/linux/netdevice.h:4937 [inline]
 xmit_one net/core/dev.c:3588 [inline]
 dev_hard_start_xmit+0x119/0x3f0 net/core/dev.c:3604
 sch_direct_xmit+0x1a9/0x580 net/sched/sch_generic.c:343
 __dev_xmit_skb net/core/dev.c:3825 [inline]
 __dev_queue_xmit+0xf1a/0x2040 net/core/dev.c:4398
 dev_queue_xmit include/linux/netdevice.h:3094 [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:236
 ip_finish_output+0x11a/0x2a0 net/ipv4/ip_output.c:324
 NF_HOOK_COND include/linux/netfilter.h:303 [inline]
 ip_output+0xab/0x170 net/ipv4/ip_output.c:434
 dst_output include/net/dst.h:450 [inline]
 ip_local_out net/ipv4/ip_output.c:130 [inline]
 __ip_queue_xmit+0xbcc/0xbf0 net/ipv4/ip_output.c:536
 ip_queue_xmit+0x38/0x50 net/ipv4/ip_output.c:550
 __tcp_transmit_skb+0x15b0/0x1970 net/ipv4/tcp_output.c:1466
 tcp_transmit_skb net/ipv4/tcp_output.c:1484 [inline]
 tcp_write_xmit+0x1410/0x3220 net/ipv4/tcp_output.c:2827
 __tcp_push_pending_frames+0x6a/0x1a0 net/ipv4/tcp_output.c:3012
 tcp_push+0x320/0x340 net/ipv4/tcp.c:750
 tcp_sendmsg_locked+0x21ff/0x2700 net/ipv4/tcp.c:1325
 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1357
 inet_sendmsg+0x77/0xd0 net/ipv4/af_inet.c:853
 sock_sendmsg_nosec net/socket.c:729 [inline]
 __sock_sendmsg+0x102/0x180 net/socket.c:744
 sock_write_iter+0x15e/0x1a0 net/socket.c:1165
 new_sync_write fs/read_write.c:590 [inline]
 vfs_write+0x77f/0x920 fs/read_write.c:683
 ksys_write+0xeb/0x1b0 fs/read_write.c:736
 __do_sys_write fs/read_write.c:748 [inline]
 __se_sys_write fs/read_write.c:745 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:745
 x64_sys_call+0x27dd/0x2d60 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: 0x0000 -> 0x0001

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3303 Comm: syz-executor Tainted: G        W          6.12.0-syzkaller #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/18 19:37 upstream adc218676eef e7bb5d6e .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/11/17 09:38 upstream b5a24181e461 cfe3a04a .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/11/15 14:29 upstream cfaaa7d010d1 f6ede3a3 .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/11/12 02:33 upstream 2d5404caa8c7 75bb1b32 .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/11/11 02:16 upstream a9cda7c0ffed 6b856513 .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/11/05 22:35 upstream 2e1b3cc9d7f7 da38b4c9 .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/11/03 11:14 upstream 11066801dd4b f00eed24 .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/10/23 15:39 upstream c2ee9f594da8 15fa2979 .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/10/19 13:19 upstream 3d5ad2d4eca3 cd6fc0a3 .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/10/07 05:56 upstream 8cf0b93919e1 d7906eff .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/09/25 12:03 upstream 684a64bf32b6 349a68c4 .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/09/20 18:17 upstream baeb9a7d8b60 6f888b75 .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/09/20 02:06 upstream 2004cef11ea0 6f888b75 .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.