syzbot


KMSAN: uninit-value in __vb2_perform_fileio

Status: closed as invalid on 2021/12/14 12:02
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 1490d, last: 1268d

Sample crash report:
==================================================================
BUG: KMSAN: uninit-value in copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
BUG: KMSAN: uninit-value in raw_copy_to_user arch/x86/include/asm/uaccess_64.h:128 [inline]
BUG: KMSAN: uninit-value in _copy_to_user+0x1d6/0x1f0 lib/usercopy.c:31
CPU: 0 PID: 12035 Comm: syz-executor378 Not tainted 5.1.0+ #1
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+0x191/0x1f0 lib/dump_stack.c:113
 kmsan_report+0x162/0x2d0 mm/kmsan/kmsan.c:623
 __msan_warning+0x75/0xe0 mm/kmsan/kmsan_instr.c:310
 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
 raw_copy_to_user arch/x86/include/asm/uaccess_64.h:128 [inline]
 _copy_to_user+0x1d6/0x1f0 lib/usercopy.c:31
 copy_to_user include/linux/uaccess.h:174 [inline]
 __vb2_perform_fileio+0x67b/0x22b0 drivers/media/common/videobuf2/videobuf2-core.c:2650
 vb2_read+0xf7/0x110 drivers/media/common/videobuf2/videobuf2-core.c:2724
 vb2_fop_read+0x475/0x640 drivers/media/common/videobuf2/videobuf2-v4l2.c:1090
 v4l2_read+0x274/0x4a0 drivers/media/v4l2-core/v4l2-dev.c:317
 __vfs_read+0x1a5/0xbe0 fs/read_write.c:416
 vfs_read+0x359/0x6f0 fs/read_write.c:452
 ksys_read+0x1c5/0x440 fs/read_write.c:579
 __do_sys_read fs/read_write.c:589 [inline]
 __se_sys_read+0x92/0xb0 fs/read_write.c:587
 __x64_sys_read+0x4a/0x70 fs/read_write.c:587
 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x444f09
Code: e8 ac e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 0b cd fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fff5c228ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000444f09
RDX: 0000000000000052 RSI: 0000000020000540 RDI: 0000000000000003
RBP: 0000000000018773 R08: 0000000000000004 R09: 00000000004002e0
R10: 000000000000000f R11: 0000000000000246 R12: 00000000004020a0
R13: 0000000000402130 R14: 0000000000000000 R15: 0000000000000000

Uninit was created at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:206 [inline]
 kmsan_internal_poison_shadow+0x92/0x150 mm/kmsan/kmsan.c:160
 kmsan_kmalloc+0xa4/0x130 mm/kmsan/kmsan_hooks.c:177
 kmsan_slab_alloc+0xe/0x10 mm/kmsan/kmsan_hooks.c:186
 slab_post_alloc_hook mm/slab.h:442 [inline]
 slab_alloc_node mm/slub.c:2771 [inline]
 __kmalloc_node_track_caller+0xcba/0xf30 mm/slub.c:4399
 __kmalloc_reserve net/core/skbuff.c:140 [inline]
 __alloc_skb+0x306/0xa10 net/core/skbuff.c:208
 alloc_skb_fclone include/linux/skbuff.h:1108 [inline]
 sk_stream_alloc_skb+0x175/0xca0 net/ipv4/tcp.c:874
 tcp_sendmsg_locked+0x2a48/0x6c30 net/ipv4/tcp.c:1287
 tcp_sendmsg+0xb2/0x100 net/ipv4/tcp.c:1445
 inet_sendmsg+0x546/0x720 net/ipv4/af_inet.c:798
 sock_sendmsg_nosec net/socket.c:651 [inline]
 sock_sendmsg net/socket.c:661 [inline]
 sock_write_iter+0x3f3/0x4e0 net/socket.c:988
 call_write_iter include/linux/fs.h:1866 [inline]
 new_sync_write fs/read_write.c:474 [inline]
 __vfs_write+0x95a/0xc10 fs/read_write.c:487
 vfs_write+0x481/0x920 fs/read_write.c:549
 ksys_write+0x1c5/0x440 fs/read_write.c:599
 __do_sys_write fs/read_write.c:611 [inline]
 __se_sys_write+0x92/0xb0 fs/read_write.c:608
 __x64_sys_write+0x4a/0x70 fs/read_write.c:608
 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
==================================================================

Crashes (21):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kmsan-gce 2019/06/13 07:36 https://github.com/google/kmsan.git master 62c1edc4b8ee 3f4e812b .config log report syz C
ci-upstream-kmsan-gce 2019/06/09 11:12 https://github.com/google/kmsan.git master 62c1edc4b8ee 0159583c .config log report syz C
ci-upstream-kmsan-gce 2019/06/09 07:24 https://github.com/google/kmsan.git master 62c1edc4b8ee 0159583c .config log report syz C
ci-upstream-kmsan-gce 2019/06/09 04:05 https://github.com/google/kmsan.git master 62c1edc4b8ee 0159583c .config log report syz C
ci-upstream-kmsan-gce 2019/06/08 18:00 https://github.com/google/kmsan.git master 62c1edc4b8ee 0159583c .config log report syz C
ci-upstream-kmsan-gce 2019/06/08 07:55 https://github.com/google/kmsan.git master 62c1edc4b8ee cf9c3a50 .config log report syz C
ci-upstream-kmsan-gce 2019/06/07 01:17 https://github.com/google/kmsan.git master f75e4cfea97f 698773cb .config log report syz C
ci-upstream-kmsan-gce 2019/06/04 10:13 https://github.com/google/kmsan.git master f75e4cfea97f ce07a7ae .config log report syz C
ci-upstream-kmsan-gce 2019/06/03 20:24 https://github.com/google/kmsan.git master f75e4cfea97f 63bf051f .config log report syz C
ci-upstream-kmsan-gce 2019/05/08 15:00 https://github.com/google/kmsan.git master d062d017e907 a7383bfa .config log report syz C
ci-upstream-kmsan-gce 2019/04/30 00:33 https://github.com/google/kmsan.git master 2550ba6f60b5 b617407b .config log report syz C
ci-upstream-kmsan-gce 2019/04/28 22:14 https://github.com/google/kmsan.git master 199a02db1f61 b617407b .config log report syz C
ci-upstream-kmsan-gce 2019/04/28 21:49 https://github.com/google/kmsan.git master 199a02db1f61 b617407b .config log report syz C
ci-upstream-kmsan-gce 2019/04/27 19:26 https://github.com/google/kmsan.git master 199a02db1f61 b617407b .config log report syz C
ci-upstream-kmsan-gce 2019/04/26 07:08 https://github.com/google/kmsan.git master 199a02db1f61 b617407b .config log report syz C
ci-upstream-kmsan-gce 2019/04/24 04:21 https://github.com/google/kmsan.git master 199a02db1f61 4d3d6a50 .config log report syz C
ci-upstream-kmsan-gce 2019/04/22 13:40 https://github.com/google/kmsan.git master 199a02db1f61 0a77c33c .config log report syz C
ci-upstream-kmsan-gce 2019/04/12 19:42 https://github.com/google/kmsan.git master 199a02db1f61 8916f5e1 .config log report syz C
ci-upstream-kmsan-gce 2019/03/24 03:23 https://github.com/google/kmsan.git master c10a026b8dee a2cef203 .config log report syz C
ci-upstream-kmsan-gce 2018/11/15 15:49 https://github.com/google/kmsan.git master 7fd538851cec 5f5f6d14 .config log report syz C
ci-upstream-kmsan-gce 2018/11/03 15:17 https://github.com/google/kmsan.git master 88b95ef4c780 8bd6bd63 .config log report syz C
* Struck through repros no longer work on HEAD.