syzbot


KMSAN: uninit-value in virtqueue_add

Status: closed as invalid on 2020/07/22 14:02
Subsystems: virt
[Documentation on labels]
First crash: 1659d, last: 1543d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in virtqueue_add (3) virt 13 709d 1001d 0/28 auto-obsoleted due to no activity on 2023/02/12 03:53
upstream KMSAN: uninit-value in virtqueue_add (5) virt 170 120d 120d 0/28 auto-obsoleted due to no activity on 2024/08/23 15:10
upstream KMSAN: kernel-infoleak in _copy_to_iter (8) mm C 21180 492d 587d 22/28 fixed on 2023/06/08 14:41
upstream KMSAN: uninit-value in virtqueue_add (4) mm C 203184 124d 285d 25/28 fixed on 2024/06/11 10:02

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in kmsan_handle_dma_page mm/kmsan/kmsan_hooks.c:348 [inline]
BUG: KMSAN: uninit-value in kmsan_handle_dma+0x9f/0xb0 mm/kmsan/kmsan_hooks.c:375
CPU: 1 PID: 8881 Comm: syz-executor327 Not tainted 5.6.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1c9/0x220 lib/dump_stack.c:118
 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118
 kmsan_internal_check_memory+0x238/0x3d0 mm/kmsan/kmsan.c:423
 kmsan_handle_dma_page mm/kmsan/kmsan_hooks.c:348 [inline]
 kmsan_handle_dma+0x9f/0xb0 mm/kmsan/kmsan_hooks.c:375
 vring_map_one_sg drivers/virtio/virtio_ring.c:336 [inline]
 virtqueue_add_split drivers/virtio/virtio_ring.c:491 [inline]
 virtqueue_add+0x46db/0x70f0 drivers/virtio/virtio_ring.c:1714
 virtqueue_add_sgs+0x319/0x330 drivers/virtio/virtio_ring.c:1748
 __virtscsi_add_cmd drivers/scsi/virtio_scsi.c:447 [inline]
 virtscsi_add_cmd+0x888/0xb20 drivers/scsi/virtio_scsi.c:481
 virtscsi_queuecommand+0xe7e/0x1090 drivers/scsi/virtio_scsi.c:578
 scsi_dispatch_cmd drivers/scsi/scsi_lib.c:1554 [inline]
 scsi_queue_rq+0x41c5/0x4d20 drivers/scsi/scsi_lib.c:1689
 blk_mq_dispatch_rq_list+0xf81/0x2850 block/blk-mq.c:1246
 blk_mq_do_dispatch_sched block/blk-mq-sched.c:115 [inline]
 blk_mq_sched_dispatch_requests+0xbe0/0x1840 block/blk-mq-sched.c:216
 __blk_mq_run_hw_queue+0x171/0x3a0 block/blk-mq.c:1382
 __blk_mq_delay_run_hw_queue+0x15d/0x6a0 block/blk-mq.c:1459
 blk_mq_run_hw_queue+0x4ac/0x670 block/blk-mq.c:1512
 blk_mq_sched_insert_requests+0x496/0x640 block/blk-mq-sched.c:474
 blk_mq_flush_plug_list+0xb31/0xca0 block/blk-mq.c:1762
 blk_flush_plug_list+0x70f/0x790 block/blk-core.c:1766
 blk_finish_plug+0xa0/0xd0 block/blk-core.c:1783
 ext4_writepages+0x57e1/0x62a0 fs/ext4/inode.c:2833
 do_writepages+0x143/0x400 mm/page-writeback.c:2344
 __filemap_fdatawrite_range+0x53b/0x5b0 mm/filemap.c:421
 __filemap_fdatawrite mm/filemap.c:429 [inline]
 filemap_flush+0x66/0x70 mm/filemap.c:456
 ext4_alloc_da_blocks+0x22d/0x290 fs/ext4/inode.c:3146
 ext4_release_file+0xa0/0x3e0 fs/ext4/file.c:142
 __fput+0x4c7/0xb90 fs/file_table.c:280
 ____fput+0x37/0x40 fs/file_table.c:313
 task_work_run+0x214/0x2b0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop arch/x86/entry/common.c:164 [inline]
 prepare_exit_to_usermode+0x3c8/0x520 arch/x86/entry/common.c:195
 syscall_return_slowpath+0x95/0x5f0 arch/x86/entry/common.c:278
 do_syscall_32_irqs_on arch/x86/entry/common.c:354 [inline]
 do_fast_syscall_32+0x422/0x6e0 arch/x86/entry/common.c:410
 entry_SYSENTER_compat+0x68/0x77 arch/x86/entry/entry_64_compat.S:139
RIP: 0023:0xf7f86d99
Code: 90 e8 0b 00 00 00 f3 90 0f ae e8 eb f9 8d 74 26 00 89 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90
RSP: 002b:00000000ffd8507c EFLAGS: 00000296 ORIG_RAX: 0000000000000006
RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000000
RDX: 0000000000000004 RSI: 00000000080fd00c RDI: 0000000000000006
RBP: 00000000ffd850c4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline]
 kmsan_internal_chain_origin+0xad/0x130 mm/kmsan/kmsan.c:310
 kmsan_memcpy_memmove_metadata+0x272/0x2e0 mm/kmsan/kmsan.c:247
 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:267
 __msan_memcpy+0x43/0x50 mm/kmsan/kmsan_instr.c:116
 memcpy_from_page lib/iov_iter.c:470 [inline]
 iov_iter_copy_from_user_atomic+0xf5b/0x1500 lib/iov_iter.c:1005
 generic_perform_write+0x499/0x9a0 mm/filemap.c:3295
 ext4_buffered_write_iter+0x795/0xac0 fs/ext4/file.c:270
 ext4_file_write_iter+0x1330/0x2c70 fs/ext4/file.c:491
 do_iter_readv_writev+0xa23/0xc70 include/linux/fs.h:1896
 do_iter_write+0x304/0xdc0 fs/read_write.c:998
 vfs_iter_write+0x118/0x180 fs/read_write.c:1039
 iter_file_splice_write+0xb1b/0x17b0 fs/splice.c:760
 do_splice_from fs/splice.c:863 [inline]
 direct_splice_actor+0x19e/0x200 fs/splice.c:1037
 splice_direct_to_actor+0x8a9/0x11e0 fs/splice.c:992
 do_splice_direct+0x342/0x580 fs/splice.c:1080
 do_sendfile+0xff5/0x1d10 fs/read_write.c:1520
 __do_compat_sys_sendfile fs/read_write.c:1602 [inline]
 __se_compat_sys_sendfile+0x301/0x3c0 fs/read_write.c:1585
 __ia32_compat_sys_sendfile+0x11a/0x160 fs/read_write.c:1585
 do_syscall_32_irqs_on arch/x86/entry/common.c:339 [inline]
 do_fast_syscall_32+0x3c7/0x6e0 arch/x86/entry/common.c:410
 entry_SYSENTER_compat+0x68/0x77 arch/x86/entry/entry_64_compat.S:139

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline]
 kmsan_internal_chain_origin+0xad/0x130 mm/kmsan/kmsan.c:310
 kmsan_memcpy_memmove_metadata+0x272/0x2e0 mm/kmsan/kmsan.c:247
 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:267
 kmsan_copy_to_user+0x50/0x90 mm/kmsan/kmsan_hooks.c:262
 _copy_to_user+0x15a/0x1f0 lib/usercopy.c:33
 copy_to_user include/linux/uaccess.h:174 [inline]
 proc_put_long kernel/sysctl.c:2260 [inline]
 __do_proc_dointvec+0xed3/0x1a70 kernel/sysctl.c:2385
 do_proc_dointvec kernel/sysctl.c:2412 [inline]
 proc_dointvec+0x139/0x160 kernel/sysctl.c:2572
 proc_sys_call_handler+0xa92/0xd00 fs/proc/proc_sysctl.c:616
 proc_sys_read+0xc6/0xe0 fs/proc/proc_sysctl.c:630
 do_loop_readv_writev fs/read_write.c:714 [inline]
 do_iter_read+0x8df/0xe10 fs/read_write.c:935
 vfs_readv+0x1ee/0x280 fs/read_write.c:1053
 kernel_readv fs/splice.c:365 [inline]
 default_file_splice_read+0xb1d/0x11d0 fs/splice.c:422
 do_splice_to fs/splice.c:892 [inline]
 splice_direct_to_actor+0x5d8/0x11e0 fs/splice.c:971
 do_splice_direct+0x342/0x580 fs/splice.c:1080
 do_sendfile+0xff5/0x1d10 fs/read_write.c:1520
 __do_compat_sys_sendfile fs/read_write.c:1602 [inline]
 __se_compat_sys_sendfile+0x301/0x3c0 fs/read_write.c:1585
 __ia32_compat_sys_sendfile+0x11a/0x160 fs/read_write.c:1585
 do_syscall_32_irqs_on arch/x86/entry/common.c:339 [inline]
 do_fast_syscall_32+0x3c7/0x6e0 arch/x86/entry/common.c:410
 entry_SYSENTER_compat+0x68/0x77 arch/x86/entry/entry_64_compat.S:139

Local variable ----tmp.i@__do_proc_dointvec created at:
 proc_put_long kernel/sysctl.c:2256 [inline]
 __do_proc_dointvec+0xd1b/0x1a70 kernel/sysctl.c:2385
 proc_put_long kernel/sysctl.c:2256 [inline]
 __do_proc_dointvec+0xd1b/0x1a70 kernel/sysctl.c:2385

Byte 1 of 4096 is uninitialized
Memory access of size 4096 starts at ffff9e1ef3e37000
=====================================================

Crashes (271):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/03/28 21:00 https://github.com/google/kmsan.git master 75303409203b f1ebdfba .config console log report syz C ci-upstream-kmsan-gce-386
2020/07/19 22:13 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce
2020/07/22 13:47 https://github.com/google/kmsan.git master 91e18444d6b0 128cd85f .config console log report ci-upstream-kmsan-gce-386
2020/07/22 12:32 https://github.com/google/kmsan.git master 91e18444d6b0 128cd85f .config console log report ci-upstream-kmsan-gce-386
2020/07/22 10:46 https://github.com/google/kmsan.git master 91e18444d6b0 128cd85f .config console log report ci-upstream-kmsan-gce-386
2020/07/22 09:42 https://github.com/google/kmsan.git master 91e18444d6b0 128cd85f .config console log report ci-upstream-kmsan-gce-386
2020/07/22 09:15 https://github.com/google/kmsan.git master 91e18444d6b0 128cd85f .config console log report ci-upstream-kmsan-gce-386
2020/07/22 06:13 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config console log report ci-upstream-kmsan-gce-386
2020/07/22 04:53 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config console log report ci-upstream-kmsan-gce-386
2020/07/22 03:53 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config console log report ci-upstream-kmsan-gce-386
2020/07/22 03:53 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config console log report ci-upstream-kmsan-gce-386
2020/07/21 23:26 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config console log report ci-upstream-kmsan-gce-386
2020/07/21 21:08 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config console log report ci-upstream-kmsan-gce-386
2020/07/21 19:52 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config console log report ci-upstream-kmsan-gce-386
2020/07/21 18:45 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config console log report ci-upstream-kmsan-gce-386
2020/07/21 17:17 https://github.com/google/kmsan.git master 91e18444d6b0 21f1765e .config console log report ci-upstream-kmsan-gce-386
2020/07/21 14:50 https://github.com/google/kmsan.git master 91e18444d6b0 d88894e6 .config console log report ci-upstream-kmsan-gce-386
2020/07/21 12:50 https://github.com/google/kmsan.git master 91e18444d6b0 d88894e6 .config console log report ci-upstream-kmsan-gce-386
2020/07/21 10:11 https://github.com/google/kmsan.git master 91e18444d6b0 d88894e6 .config console log report ci-upstream-kmsan-gce-386
2020/07/21 08:57 https://github.com/google/kmsan.git master 91e18444d6b0 d88894e6 .config console log report ci-upstream-kmsan-gce-386
2020/07/21 07:31 https://github.com/google/kmsan.git master 91e18444d6b0 d88894e6 .config console log report ci-upstream-kmsan-gce-386
2020/07/21 03:39 https://github.com/google/kmsan.git master 91e18444d6b0 d88894e6 .config console log report ci-upstream-kmsan-gce-386
2020/07/21 02:36 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config console log report ci-upstream-kmsan-gce-386
2020/07/21 01:03 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config console log report ci-upstream-kmsan-gce-386
2020/07/20 23:52 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config console log report ci-upstream-kmsan-gce-386
2020/07/20 21:53 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config console log report ci-upstream-kmsan-gce-386
2020/07/20 20:04 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config console log report ci-upstream-kmsan-gce-386
2020/07/20 18:49 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config console log report ci-upstream-kmsan-gce-386
2020/07/20 17:40 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config console log report ci-upstream-kmsan-gce-386
2020/07/20 17:02 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config console log report ci-upstream-kmsan-gce-386
2020/07/20 15:47 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config console log report ci-upstream-kmsan-gce-386
2020/07/20 14:30 https://github.com/google/kmsan.git master 91e18444d6b0 4285ffa3 .config console log report ci-upstream-kmsan-gce-386
2020/07/20 12:15 https://github.com/google/kmsan.git master 91e18444d6b0 9c812472 .config console log report ci-upstream-kmsan-gce-386
2020/07/20 10:24 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce-386
2020/07/20 08:04 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce-386
2020/07/20 04:04 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce-386
2020/07/20 01:31 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce-386
2020/07/19 19:05 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce-386
2020/07/19 18:30 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce-386
2020/07/19 16:58 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce-386
2020/07/19 15:50 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce-386
2020/07/19 13:37 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce-386
2020/07/19 12:20 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce-386
* Struck through repros no longer work on HEAD.