syzbot


KCSAN: data-race in detach_buf_split / virtqueue_add

Status: auto-obsoleted due to no activity on 2023/08/05 12:21
Subsystems: virt
[Documentation on labels]
Reported-by: syzbot+888f3df5bec03d45cffc@syzkaller.appspotmail.com
First crash: 934d, last: 330d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in detach_buf_split / virtqueue_add

read to 0xffff88810176e92c of 4 bytes by task 1526 on cpu 0:
 virtqueue_add_split drivers/virtio/virtio_ring.c:575 [inline]
 virtqueue_add+0x75a/0x20e0 drivers/virtio/virtio_ring.c:2133
 virtqueue_add_inbuf+0x53/0x80 drivers/virtio/virtio_ring.c:2212
 request_entropy drivers/char/hw_random/virtio-rng.c:61 [inline]
 copy_data drivers/char/hw_random/virtio-rng.c:74 [inline]
 virtio_read+0x1c5/0x3f0 drivers/char/hw_random/virtio-rng.c:92
 rng_get_data drivers/char/hw_random/core.c:197 [inline]
 rng_dev_read+0x1a7/0x5e0 drivers/char/hw_random/core.c:234
 vfs_read+0x19f/0x5c0 fs/read_write.c:468
 ksys_read+0xeb/0x1a0 fs/read_write.c:613
 __do_sys_read fs/read_write.c:623 [inline]
 __se_sys_read fs/read_write.c:621 [inline]
 __x64_sys_read+0x42/0x50 fs/read_write.c:621
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read-write to 0xffff88810176e92c of 4 bytes by interrupt on cpu 1:
 detach_buf_split+0x316/0x570 drivers/virtio/virtio_ring.c:760
 virtqueue_get_buf_ctx_split drivers/virtio/virtio_ring.c:835 [inline]
 virtqueue_get_buf_ctx+0x3c2/0x5b0 drivers/virtio/virtio_ring.c:2327
 virtqueue_get_buf+0x1f/0x30 drivers/virtio/virtio_ring.c:2333
 random_recv_done+0x4c/0x90 drivers/char/hw_random/virtio-rng.c:42
 vring_interrupt+0x150/0x170 drivers/virtio/virtio_ring.c:2501
 __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:834
 generic_handle_irq_desc include/linux/irqdesc.h:161 [inline]
 handle_irq arch/x86/kernel/irq.c:238 [inline]
 __common_interrupt+0x3c/0xb0 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
 check_kcov_mode kernel/kcov.c:173 [inline]
 write_comp_data kernel/kcov.c:236 [inline]
 __sanitizer_cov_trace_const_cmp8+0x2c/0x80 kernel/kcov.c:311
 pie_calculate_probability+0x27f/0x520 net/sched/sch_pie.c:360
 fq_pie_timer+0xbc/0x150 net/sched/sch_fq_pie.c:387
 call_timer_fn+0x35/0x290 kernel/time/timer.c:1700
 expire_timers kernel/time/timer.c:1751 [inline]
 __run_timers+0x46c/0x650 kernel/time/timer.c:2022
 run_timer_softirq+0x1d/0x40 kernel/time/timer.c:2035
 __do_softirq+0xc1/0x265 kernel/softirq.c:553
 run_ksoftirqd+0x17/0x20 kernel/softirq.c:921
 smpboot_thread_fn+0x30a/0x4a0 kernel/smpboot.c:164
 kthread+0x1d7/0x210 kernel/kthread.c:389
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308

value changed: 0x000000ff -> 0x000000fe

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 20 Comm: ksoftirqd/1 Tainted: G        W          6.4.0-syzkaller-09775-gd85a143b69ab #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
==================================================================
==================================================================
BUG: KCSAN: data-race in detach_buf_split / virtqueue_add

read to 0xffff88810176e948 of 4 bytes by task 1554 on cpu 0:
 virtqueue_add_split drivers/virtio/virtio_ring.c:553 [inline]
 virtqueue_add+0x4b3/0x20e0 drivers/virtio/virtio_ring.c:2133
 virtqueue_add_inbuf+0x53/0x80 drivers/virtio/virtio_ring.c:2212
 request_entropy drivers/char/hw_random/virtio-rng.c:61 [inline]
 copy_data drivers/char/hw_random/virtio-rng.c:74 [inline]
 virtio_read+0x1c5/0x3f0 drivers/char/hw_random/virtio-rng.c:92
 rng_get_data drivers/char/hw_random/core.c:197 [inline]
 rng_dev_read+0x1a7/0x5e0 drivers/char/hw_random/core.c:234
 vfs_read+0x19f/0x5c0 fs/read_write.c:468
 ksys_read+0xeb/0x1a0 fs/read_write.c:613
 __do_sys_read fs/read_write.c:623 [inline]
 __se_sys_read fs/read_write.c:621 [inline]
 __x64_sys_read+0x42/0x50 fs/read_write.c:621
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read-write to 0xffff88810176e948 of 4 bytes by interrupt on cpu 1:
 detach_buf_split+0x2fc/0x570 drivers/virtio/virtio_ring.c:757
 virtqueue_get_buf_ctx_split drivers/virtio/virtio_ring.c:835 [inline]
 virtqueue_get_buf_ctx+0x3c2/0x5b0 drivers/virtio/virtio_ring.c:2327
 virtqueue_get_buf+0x1f/0x30 drivers/virtio/virtio_ring.c:2333
 random_recv_done+0x4c/0x90 drivers/char/hw_random/virtio-rng.c:42
 vring_interrupt+0x150/0x170 drivers/virtio/virtio_ring.c:2501
 __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:834
 generic_handle_irq_desc include/linux/irqdesc.h:161 [inline]
 handle_irq arch/x86/kernel/irq.c:238 [inline]
 __common_interrupt+0x3c/0xb0 arch/x86/kernel/irq.c:257
 common_interrupt+0x3d/0x90 arch/x86/kernel/irq.c:247
 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:636
 get_current arch/x86/include/asm/current.h:41 [inline]
 write_comp_data kernel/kcov.c:235 [inline]
 __sanitizer_cov_trace_const_cmp8+0x10/0x80 kernel/kcov.c:311
 pie_calculate_probability+0x2b2/0x520 net/sched/sch_pie.c:369
 fq_pie_timer+0xbc/0x150 net/sched/sch_fq_pie.c:387
 call_timer_fn+0x35/0x290 kernel/time/timer.c:1700
 expire_timers kernel/time/timer.c:1751 [inline]
 __run_timers+0x46c/0x650 kernel/time/timer.c:2022
 run_timer_softirq+0x1d/0x40 kernel/time/timer.c:2035
 __do_softirq+0xc1/0x265 kernel/softirq.c:553
 invoke_softirq kernel/softirq.c:427 [inline]
 __irq_exit_rcu kernel/softirq.c:632 [inline]
 irq_exit_rcu+0x3b/0x90 kernel/softirq.c:644
 sysvec_apic_timer_interrupt+0x6d/0x80 arch/x86/kernel/apic/apic.c:1109
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
 check_access kernel/kcsan/core.c:747 [inline]
 __tsan_read8+0xb3/0x180 kernel/kcsan/core.c:1025
 skb_end_pointer include/linux/skbuff.h:1612 [inline]
 __skb_datagram_iter+0x28b/0x4f0 net/core/datagram.c:429
 skb_copy_datagram_iter+0x41/0x130 net/core/datagram.c:527
 skb_copy_datagram_msg include/linux/skbuff.h:3942 [inline]
 tcp_recvmsg_locked+0x5f6/0x1540 net/ipv4/tcp.c:2488
 tcp_recvmsg+0x13b/0x490 net/ipv4/tcp.c:2566
 inet_recvmsg+0xa2/0x210 net/ipv4/af_inet.c:862
 sock_recvmsg_nosec net/socket.c:1020 [inline]
 sock_recvmsg net/socket.c:1041 [inline]
 sock_read_iter+0x1a0/0x210 net/socket.c:1107
 call_read_iter include/linux/fs.h:1865 [inline]
 new_sync_read fs/read_write.c:389 [inline]
 vfs_read+0x3da/0x5c0 fs/read_write.c:470
 ksys_read+0xeb/0x1a0 fs/read_write.c:613
 __do_sys_read fs/read_write.c:623 [inline]
 __se_sys_read fs/read_write.c:621 [inline]
 __x64_sys_read+0x42/0x50 fs/read_write.c:621
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x00000001 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3060 Comm: syz-fuzzer Tainted: G        W          6.4.0-syzkaller-09775-gd85a143b69ab #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
==================================================================

Crashes (821):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/07/01 12:20 upstream d85a143b69ab bfc47836 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/30 17:03 upstream e55e5df193d2 af3053d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/30 15:00 upstream e55e5df193d2 01298212 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/30 11:18 upstream c6b0271053e7 01298212 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/29 09:49 upstream 3a8a670eeeaa 134ddc02 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/28 18:30 upstream 6aeadf7896bf ca69c785 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/28 14:22 upstream 6aeadf7896bf 4cd5bb25 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/27 22:30 upstream 04fc8904d5d1 4cd5bb25 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/27 09:28 upstream 1ef6663a587b 4cd5bb25 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/26 20:09 upstream c0a572d9d32f 4cd5bb25 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/26 17:14 upstream 6995e2de6891 4cd5bb25 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/25 19:22 upstream 547cc9be86f4 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/24 14:03 upstream a92b7d26c743 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/23 02:36 upstream 8a28a0b6f1a1 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/22 02:32 upstream dad9774deaf1 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/20 21:36 upstream 99ec1ed7c2ed 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/20 20:34 upstream 99ec1ed7c2ed 09ffe269 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/20 01:32 upstream 692b7dc87ca6 09ffe269 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/19 13:38 upstream 45a3e24f65e9 d521bc56 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/19 11:15 upstream 45a3e24f65e9 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/18 18:41 upstream 8c1f0c38b310 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/17 21:21 upstream 1b29d271614a f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/17 03:36 upstream 1639fae5132b f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/16 14:18 upstream 40f71e7cd3c6 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/16 01:05 upstream 62d8779610bb f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/15 11:04 upstream b6dad5178cea 90d4044e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/14 21:08 upstream b6dad5178cea 76decb82 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/14 07:24 upstream 15adb51c04cc d2ee9228 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/13 18:42 upstream fb054096aea0 749afb64 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/12 17:46 upstream 858fd168a95c aaed0183 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/12 13:54 upstream 858fd168a95c 49519f06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/12 03:06 upstream 4c605260bc60 49519f06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/11 16:31 upstream 022ce8862dff 49519f06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/10 07:27 upstream 64569520920a 9018a337 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/07 21:46 upstream a27648c74210 058b3a5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/05 22:42 upstream f8dba31b0a82 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/05 03:02 upstream 9561de3a55be a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/04 08:30 upstream e5282a7d8f6b a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/04 04:24 upstream 51f269a6ecc7 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/03 09:42 upstream 4ecd704a4c51 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/02 15:07 upstream c43a6ff9f93f a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2023/06/02 01:40 upstream 1874a42a7d74 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2021/12/01 08:26 upstream 58e1100fdc59 5fa3eacc .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
2021/11/04 05:47 upstream ce840177930f 4c1be0be .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in detach_buf_split / virtqueue_add
* Struck through repros no longer work on HEAD.