syzbot


KCSAN: data-race in virtqueue_disable_cb / virtqueue_get_buf_ctx (2)

Status: auto-closed as invalid on 2021/08/15 04:56
Subsystems: virt
[Documentation on labels]
First crash: 1296d, last: 1296d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in virtqueue_disable_cb / virtqueue_get_buf_ctx virt 31 1819d 1918d 0/28 auto-closed as invalid on 2020/04/14 10:20

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

write to 0xffff888101a9d4f0 of 2 bytes by interrupt on cpu 0:
 virtqueue_disable_cb_split drivers/virtio/virtio_ring.c:741 [inline]
 virtqueue_disable_cb+0x8b/0x120 drivers/virtio/virtio_ring.c:1925
 skb_xmit_done+0x5b/0x110 drivers/net/virtio_net.c:351
 vring_interrupt+0x11e/0x140 drivers/virtio/virtio_ring.c:2049
 __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:819
 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+0x73/0x90 arch/x86/kernel/irq.c:240
 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:629
 kcsan_setup_watchpoint+0x8b/0x3e0 kernel/kcsan/core.c:437
 next_uptodate_page+0x340/0x670 mm/filemap.c:3147
 next_map_page mm/filemap.c:3171 [inline]
 filemap_map_pages+0x761/0x870 mm/filemap.c:3227
 do_fault_around mm/memory.c:4014 [inline]
 do_read_fault mm/memory.c:4028 [inline]
 do_fault mm/memory.c:4161 [inline]
 handle_pte_fault mm/memory.c:4420 [inline]
 __handle_mm_fault mm/memory.c:4555 [inline]
 handle_mm_fault+0xd9a/0x1a60 mm/memory.c:4653
 do_user_addr_fault+0x609/0xc00 arch/x86/mm/fault.c:1390
 handle_page_fault arch/x86/mm/fault.c:1475 [inline]
 exc_page_fault+0x91/0x220 arch/x86/mm/fault.c:1531
 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:568

read to 0xffff888101a9d4f0 of 2 bytes by task 1743 on cpu 1:
 virtqueue_get_buf_ctx_split drivers/virtio/virtio_ring.c:725 [inline]
 virtqueue_get_buf_ctx+0x3b2/0x5d0 drivers/virtio/virtio_ring.c:1900
 virtqueue_get_buf+0x1b/0x20 drivers/virtio/virtio_ring.c:1906
 free_old_xmit_skbs+0x3c/0x180 drivers/net/virtio_net.c:1469
 start_xmit+0xbb/0xaf0 drivers/net/virtio_net.c:1673
 __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:3658
 dev_hard_start_xmit+0x72/0x120 net/core/dev.c:3674
 sch_direct_xmit+0x1a8/0x5c0 net/sched/sch_generic.c:342
 __dev_xmit_skb net/core/dev.c:3874 [inline]
 __dev_queue_xmit+0xe9a/0x1c10 net/core/dev.c:4241
 dev_queue_xmit+0x13/0x20 net/core/dev.c:4306
 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/0x19e0 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:2689
 __tcp_push_pending_frames+0x68/0x1c0 net/ipv4/tcp_output.c:2873
 tcp_push_pending_frames include/net/tcp.h:1877 [inline]
 tcp_data_snd_check net/ipv4/tcp_input.c:5395 [inline]
 tcp_rcv_established+0x8a1/0x1320 net/ipv4/tcp_input.c:5890
 tcp_v4_do_rcv+0x261/0x4f0 net/ipv4/tcp_ipv4.c:1694
 sk_backlog_rcv include/net/sock.h:1020 [inline]
 __release_sock+0xf2/0x270 net/core/sock.c:2594
 release_sock+0x40/0x110 net/core/sock.c:3118
 tcp_sendmsg+0x36/0x40 net/ipv4/tcp.c:1459
 inet_sendmsg+0x5f/0x80 net/ipv4/af_inet.c:821
 sock_sendmsg_nosec net/socket.c:702 [inline]
 sock_sendmsg net/socket.c:722 [inline]
 sock_write_iter+0x1a4/0x200 net/socket.c:1049
 call_write_iter include/linux/fs.h:2114 [inline]
 new_sync_write fs/read_write.c:518 [inline]
 vfs_write+0x69d/0x770 fs/read_write.c:605
 ksys_write+0xce/0x180 fs/read_write.c:658
 __do_sys_write fs/read_write.c:670 [inline]
 __se_sys_write fs/read_write.c:667 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:667
 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: 0x0000 -> 0x0001

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 1743 Comm: sshd Tainted: G        W         5.13.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/07/11 04:47 upstream 3dbdb38e2869 8f5a7b8c .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in virtqueue_disable_cb / virtqueue_get_buf_ctx
* Struck through repros no longer work on HEAD.