syzbot


KCSAN: data-race in detach_buf_split / virtqueue_add

Status: moderation: reported on 2021/12/01 23:44
Reported-by: syzbot+888f3df5bec03d45cffc@syzkaller.appspotmail.com
First crash: 397d, last: 4h35m

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

read to 0xffff88810135ca2c of 4 bytes by task 23247 on cpu 0:
 virtqueue_add_split drivers/virtio/virtio_ring.c:569 [inline]
 virtqueue_add+0x756/0x21b0 drivers/virtio/virtio_ring.c:2096
 virtqueue_add_inbuf+0x4f/0x80 drivers/virtio/virtio_ring.c:2175
 request_entropy drivers/char/hw_random/virtio-rng.c:61 [inline]
 copy_data drivers/char/hw_random/virtio-rng.c:74 [inline]
 virtio_read+0x1e7/0x440 drivers/char/hw_random/virtio-rng.c:92
 rng_get_data drivers/char/hw_random/core.c:198 [inline]
 rng_dev_read+0x1b4/0x630 drivers/char/hw_random/core.c:235
 do_iter_read+0x2d5/0x760 fs/read_write.c:798
 vfs_readv fs/read_write.c:916 [inline]
 do_preadv+0x159/0x230 fs/read_write.c:1008
 __do_sys_preadv fs/read_write.c:1058 [inline]
 __se_sys_preadv fs/read_write.c:1053 [inline]
 __x64_sys_preadv+0x54/0x60 fs/read_write.c:1053
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read-write to 0xffff88810135ca2c of 4 bytes by interrupt on cpu 1:
 detach_buf_split+0x307/0x580 drivers/virtio/virtio_ring.c:754
 virtqueue_get_buf_ctx_split drivers/virtio/virtio_ring.c:829 [inline]
 virtqueue_get_buf_ctx+0x397/0x580 drivers/virtio/virtio_ring.c:2290
 virtqueue_get_buf+0x1b/0x20 drivers/virtio/virtio_ring.c:2296
 random_recv_done+0x48/0x80 drivers/char/hw_random/virtio-rng.c:42
 vring_interrupt+0x14c/0x170 drivers/virtio/virtio_ring.c:2470
 __handle_irq_event_percpu+0x92/0x400 kernel/irq/handle.c:158
 handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
 handle_irq_event+0x60/0xf0 kernel/irq/handle.c:210
 handle_edge_irq+0x17e/0x5a0 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+0x60/0x100 arch/x86/kernel/irq.c:250
 common_interrupt+0x9a/0xc0 arch/x86/kernel/irq.c:240
 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:640
 should_resched arch/x86/include/asm/preempt.h:103 [inline]
 __local_bh_enable_ip+0x5b/0x80 kernel/softirq.c:403
 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:167 [inline]
 _raw_spin_unlock_bh+0x32/0x40 kernel/locking/spinlock.c:210
 spin_unlock_bh include/linux/spinlock.h:395 [inline]
 batadv_nc_purge_paths+0x26f/0x2c0 net/batman-adv/network-coding.c:471
 batadv_nc_worker+0x45b/0xc00 net/batman-adv/network-coding.c:722
 process_one_work+0x3d3/0x720 kernel/workqueue.c:2289
 worker_thread+0x618/0xa70 kernel/workqueue.c:2436
 kthread+0x1a9/0x1e0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306

value changed: 0x00000100 -> 0x000000ff

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 23039 Comm: kworker/u4:3 Not tainted 6.1.0-rc8-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Workqueue: bat_events batadv_nc_worker
==================================================================

Crashes (565):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/12/06 04:09 upstream 76dcd734eca2 045cbb84 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/12/05 04:38 upstream 0ba09b173387 e080de16 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/12/04 01:55 upstream c2bf05db6c78 e080de16 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/12/03 07:20 upstream 97ee9d1c1696 e080de16 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/12/02 15:30 upstream a4412fdd49dc e080de16 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/12/01 07:37 upstream 04aa64375f48 4c2a66e8 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/30 16:06 upstream 01f856ae6d0c 4c2a66e8 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/30 08:47 upstream 01f856ae6d0c 579a3740 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/30 01:56 upstream ca57f02295f1 579a3740 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/29 03:14 upstream b7b275e60bcd ca9683b8 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/28 06:40 upstream b7b275e60bcd f4470a7b .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/28 00:15 upstream faf68e3523c2 f4470a7b .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/27 04:51 upstream 644e9524388a f4470a7b .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/26 01:02 upstream 08ad43d554ba f4470a7b .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/25 01:04 upstream 4312098baf37 ff68ff8f .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/23 15:50 upstream eb7081409f94 52fdf57a .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/22 23:06 upstream eb7081409f94 9da37ae8 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/22 14:32 upstream eb7081409f94 1c576c23 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/21 14:44 upstream eb7081409f94 5bb70014 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/20 05:57 upstream fe24a97cf254 5bb70014 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/18 20:57 upstream 84368d882b96 5bb70014 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/16 19:17 upstream 59d0d52c30d4 3a127a31 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/16 00:32 upstream 81e7cfa3a9eb 3a127a31 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/15 06:54 upstream e01d50cbd6ee 97de9cfc .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/14 14:48 upstream 094226ad94f4 943f4cb8 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/13 16:41 upstream fef7fd48922d f42ee5d8 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/12 14:14 upstream 8f2975c2bb4c f42ee5d8 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/11 14:06 upstream 4bbf3422df78 f42ee5d8 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/09 05:48 upstream f141df371335 5fa28208 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/08 18:04 upstream 59f2f4b8a757 060f945e .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/07 15:48 upstream f0c4d9fc9cc9 a779b11a .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/06 19:48 upstream 2f5065a0bc9d 6d752409 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/05 16:37 upstream b208b9fbbcba 6d752409 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/03 20:34 upstream f2f32f8af2b0 7a2ebf95 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/03 10:54 upstream 8e5423e991e8 7a2ebf95 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/02 00:01 upstream f526d6a82242 08977f5d .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/01 07:37 upstream 5aaef24b5c6d a1d8560a .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/11/01 00:03 upstream 30a0b95b1335 2a71366b .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/10/30 23:21 upstream b72018ab8236 2a71366b .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/10/30 03:24 upstream 91562cf99364 2a71366b .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/10/29 13:49 upstream 576e61cea1e4 2a71366b .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/10/29 04:19 upstream 576e61cea1e4 899d812a .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/10/28 19:08 upstream 05c31d25cc96 8168b69e .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/10/28 15:04 upstream 23758867219c 8168b69e .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/10/28 03:32 upstream 23758867219c 5c716ff6 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2022/10/27 22:15 upstream b229b6ca5abb 5c716ff6 .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2021/12/01 08:26 upstream 58e1100fdc59 5fa3eacc .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
ci2-upstream-kcsan-gce 2021/11/04 05:47 upstream ce840177930f 4c1be0be .config log report info KCSAN: data-race in detach_buf_split / virtqueue_add
* Struck through repros no longer work on HEAD.