[moderation] [virtualization?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (2)

3 views
Skip to first unread message

syzbot

unread,
Dec 10, 2023, 7:04:30 PM12/10/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3b47bc037bd4 Merge tag 'pinctrl-v6.7-2' of git://git.kerne..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13062b52e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=585869067cd7ce59
dashboard link: https://syzkaller.appspot.com/bug?extid=684fce18097cf19cff5e
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [jaso...@redhat.com linux-...@vger.kernel.org m...@redhat.com virtual...@lists.linux.dev xuan...@linux.alibaba.com]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/231e21487056/disk-3b47bc03.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/eae871bb6b73/vmlinux-3b47bc03.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0c20f8f08d47/bzImage-3b47bc03.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+684fce...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in virtqueue_disable_cb / vring_interrupt

write to 0xffff8881019d3652 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+0x7a/0x90 arch/x86/kernel/irq.c:247
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:636
decode_watchpoint kernel/kcsan/encoding.h:74 [inline]
find_watchpoint kernel/kcsan/core.c:132 [inline]
check_access kernel/kcsan/core.c:737 [inline]
__tsan_read2+0x42/0x180 kernel/kcsan/core.c:1023
mb_find_order_for_block fs/ext4/mballoc.c:1729 [inline]
mb_find_extent+0x604/0x890 fs/ext4/mballoc.c:2001
ext4_mb_complex_scan_group+0x260/0x7f0 fs/ext4/mballoc.c:2472
ext4_mb_regular_allocator+0xfcd/0x2380 fs/ext4/mballoc.c:2905
ext4_mb_new_blocks+0x801/0x21e0 fs/ext4/mballoc.c:6187
ext4_ext_map_blocks+0x1086/0x3640 fs/ext4/extents.c:4285
ext4_map_blocks+0x704/0xf60 fs/ext4/inode.c:621
ext4_alloc_file_blocks+0x285/0x6f0 fs/ext4/extents.c:4462
ext4_fallocate+0x77e/0x1190 fs/ext4/extents.c:4757
vfs_fallocate+0x378/0x3e0 fs/open.c:324
do_vfs_ioctl+0x12e6/0x13a0 fs/ioctl.c:850
__do_sys_ioctl fs/ioctl.c:869 [inline]
__se_sys_ioctl+0x81/0x140 fs/ioctl.c:857
__x64_sys_ioctl+0x43/0x50 fs/ioctl.c:857
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff8881019d3652 of 1 bytes by task 3074 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+0xf6/0xa90 drivers/net/virtio_net.c:2340
__netdev_start_xmit include/linux/netdevice.h:4940 [inline]
netdev_start_xmit include/linux/netdevice.h:4954 [inline]
xmit_one net/core/dev.c:3545 [inline]
dev_hard_start_xmit+0x11b/0x3f0 net/core/dev.c:3561
sch_direct_xmit+0x1b0/0x570 net/sched/sch_generic.c:342
__dev_xmit_skb net/core/dev.c:3772 [inline]
__dev_queue_xmit+0xe59/0x1d80 net/core/dev.c:4312
dev_queue_xmit include/linux/netdevice.h:3134 [inline]
neigh_hh_output include/net/neighbour.h:526 [inline]
neigh_output include/net/neighbour.h:540 [inline]
ip_finish_output2+0x732/0x880 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+0xb09/0xb30 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/0x2fd0 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:736
tcp_sendmsg_locked+0x21b6/0x2690 net/ipv4/tcp.c:1308
tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1340
inet_sendmsg+0x63/0x80 net/ipv4/af_inet.c:847
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg net/socket.c:745 [inline]
sock_write_iter+0x1aa/0x230 net/socket.c:1158
call_write_iter include/linux/fs.h:2020 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x48a/0x790 fs/read_write.c:584
ksys_write+0xeb/0x1a0 fs/read_write.c:637
__do_sys_write fs/read_write.c:649 [inline]
__se_sys_write fs/read_write.c:646 [inline]
__x64_sys_write+0x42/0x50 fs/read_write.c:646
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 3074 Comm: syz-fuzzer Not tainted 6.7.0-rc3-syzkaller-00033-g3b47bc037bd4 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages