[moderation] [virt?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (3)

0 views
Skip to first unread message

syzbot

unread,
4:51 AM (6 hours ago) 4:51 AM
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 795c58e4c7fc Merge tag 'trace-v6.10-rc6' of git://git.kern..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16443b99980000
kernel config: https://syzkaller.appspot.com/x/.config?x=5b9537cd00be479e
dashboard link: https://syzkaller.appspot.com/bug?extid=1fab38aee34d5e513ca4
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [eper...@redhat.com 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/3d1d205c1fdf/disk-795c58e4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/641c78d42b7a/vmlinux-795c58e4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/45ecf25d8ba3/bzImage-795c58e4.xz

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

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

write to 0xffff888101b3fa52 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+0x7c/0x90 arch/x86/kernel/irq.c:278
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
__preempt_count_dec_and_test arch/x86/include/asm/preempt.h:94 [inline]
__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline]
_raw_spin_unlock_irq+0x2f/0x50 kernel/locking/spinlock.c:202
process_one_work kernel/workqueue.c:3217 [inline]
process_scheduled_works+0x43b/0x9a0 kernel/workqueue.c:3329
worker_thread+0x526/0x720 kernel/workqueue.c:3409
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 0xffff888101b3fa52 of 1 bytes by task 3067 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+0x125/0xb70 drivers/net/virtio_net.c:2586
__netdev_start_xmit include/linux/netdevice.h:4882 [inline]
netdev_start_xmit include/linux/netdevice.h:4896 [inline]
xmit_one net/core/dev.c:3578 [inline]
dev_hard_start_xmit+0x119/0x3f0 net/core/dev.c:3594
sch_direct_xmit+0x1b0/0x580 net/sched/sch_generic.c:343
__dev_xmit_skb net/core/dev.c:3807 [inline]
__dev_queue_xmit+0xee7/0x1e50 net/core/dev.c:4359
dev_queue_xmit include/linux/netdevice.h:3095 [inline]
neigh_hh_output include/net/neighbour.h:526 [inline]
neigh_output include/net/neighbour.h:540 [inline]
ip_finish_output2+0x73b/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+0xbca/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_one+0x7d/0xa0 net/ipv4/tcp_output.c:3028
tcp_sendmsg_locked+0x1971/0x2640 net/ipv4/tcp.c:1299
tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1351
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+0x27ef/0x2d70 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 PID: 3067 Comm: syz-executor Not tainted 6.10.0-rc6-syzkaller-00069-g795c58e4c7fc #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================


---
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