syzbot


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

Status: moderation: reported on 2023/12/11 00:04
Subsystems: virtualization
[Documentation on labels]
Reported-by: syzbot+684fce18097cf19cff5e@syzkaller.appspotmail.com
First crash: 101d, last: 24d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in virtqueue_disable_cb / vring_interrupt virtualization 130 188d 675d 0/26 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 0xffff888101f32e52 of 1 bytes by interrupt on cpu 1:
 vring_interrupt+0x128/0x170 drivers/virtio/virtio_ring.c:2591
 __handle_irq_event_percpu+0x91/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+0x167/0x590 kernel/irq/chip.c:831
 generic_handle_irq_desc include/linux/irqdesc.h:161 [inline]
 handle_irq arch/x86/kernel/irq.c:238 [inline]
 __common_interrupt+0x54/0xe0 arch/x86/kernel/irq.c:257
 common_interrupt+0x7c/0x90 arch/x86/kernel/irq.c:247
 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:640
 avtab_hash security/selinux/ss/avtab.c:64 [inline]
 avtab_search_node+0x10d/0x290 security/selinux/ss/avtab.c:190
 security_compute_sid+0x744/0xed0 security/selinux/ss/services.c:1832
 security_transition_sid+0x58/0x70 security/selinux/ss/services.c:1912
 selinux_determine_inode_label+0x209/0x230 security/selinux/hooks.c:1787
 selinux_inode_init_security+0x1fd/0x490 security/selinux/hooks.c:2930
 security_inode_init_security+0x124/0x290 security/security.c:1732
 ext4_init_security+0x34/0x40 fs/ext4/xattr_security.c:58
 __ext4_new_inode+0x2004/0x2270 fs/ext4/ialloc.c:1326
 ext4_symlink+0x242/0x590 fs/ext4/namei.c:3396
 vfs_symlink+0xc2/0x1a0 fs/namei.c:4480
 do_symlinkat+0xe3/0x340 fs/namei.c:4506
 __do_sys_symlinkat fs/namei.c:4522 [inline]
 __se_sys_symlinkat fs/namei.c:4519 [inline]
 __x64_sys_symlinkat+0x62/0x70 fs/namei.c:4519
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff888101f32e52 of 1 bytes by task 3241 on cpu 0:
 virtqueue_disable_cb_split drivers/virtio/virtio_ring.c:892 [inline]
 virtqueue_disable_cb+0x92/0x180 drivers/virtio/virtio_ring.c:2446
 start_xmit+0xf0/0xa90 drivers/net/virtio_net.c:2399
 __netdev_start_xmit include/linux/netdevice.h:4989 [inline]
 netdev_start_xmit include/linux/netdevice.h:5003 [inline]
 xmit_one net/core/dev.c:3547 [inline]
 dev_hard_start_xmit+0x115/0x3f0 net/core/dev.c:3563
 sch_direct_xmit+0x1b0/0x580 net/sched/sch_generic.c:342
 __dev_xmit_skb net/core/dev.c:3776 [inline]
 __dev_queue_xmit+0xe68/0x1db0 net/core/dev.c:4317
 dev_queue_xmit include/linux/netdevice.h:3171 [inline]
 neigh_hh_output include/net/neighbour.h:526 [inline]
 neigh_output include/net/neighbour.h:540 [inline]
 ip_finish_output2+0x726/0x870 net/ipv4/ip_output.c:235
 ip_finish_output+0xf4/0x240 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:451 [inline]
 ip_local_out net/ipv4/ip_output.c:129 [inline]
 __ip_queue_xmit+0xb40/0xb60 net/ipv4/ip_output.c:535
 ip_queue_xmit+0x38/0x40 net/ipv4/ip_output.c:549
 __tcp_transmit_skb+0x11d9/0x1890 net/ipv4/tcp_output.c:1462
 tcp_transmit_skb net/ipv4/tcp_output.c:1480 [inline]
 tcp_write_xmit+0x12d7/0x2fe0 net/ipv4/tcp_output.c:2792
 __tcp_push_pending_frames+0x6a/0x1a0 net/ipv4/tcp_output.c:2977
 tcp_push+0x320/0x330 net/ipv4/tcp.c:737
 tcp_sendmsg_locked+0x21a8/0x2680 net/ipv4/tcp.c:1309
 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1341
 inet_sendmsg+0x63/0x80 net/ipv4/af_inet.c:850
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg net/socket.c:745 [inline]
 sock_write_iter+0x1aa/0x230 net/socket.c:1160
 call_write_iter include/linux/fs.h:2085 [inline]
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0x760/0x8d0 fs/read_write.c:590
 ksys_write+0xeb/0x1a0 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
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 3241 Comm: syz-fuzzer Not tainted 6.8.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/04 16:33 upstream 54be6c6c5ae8 a67b2c42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in virtqueue_disable_cb / vring_interrupt
2024/01/08 00:43 upstream 0dd3ee311255 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in virtqueue_disable_cb / vring_interrupt
2023/12/12 01:19 upstream 26aff849438c 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in virtqueue_disable_cb / vring_interrupt
2023/11/30 01:54 upstream 3b47bc037bd4 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in virtqueue_disable_cb / vring_interrupt
2023/11/19 23:47 upstream eb3479bc23fa cb976f63 .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.