syzbot


KMSAN: uninit-value in vcs_read (2)

Status: auto-closed as invalid on 2020/11/15 18:12
Subsystems: serial
[Documentation on labels]
Reported-by: syzbot+ed5a476d9404e07b9165@syzkaller.appspotmail.com
First crash: 1457d, last: 1457d
Discussions (1)
Title Replies (including bot) Last reply
KMSAN: uninit-value in vcs_read (2) 0 (1) 2020/07/23 06:33
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in vcs_read serial C 2343 2229d 2252d 11/27 fixed on 2018/11/09 05:44

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in kmsan_check_memory+0xd/0x10 mm/kmsan/kmsan_hooks.c:428
CPU: 0 PID: 20988 Comm: syz-executor.2 Not tainted 5.8.0-rc5-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+0x1df/0x240 lib/dump_stack.c:118
 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:121
 kmsan_internal_check_memory+0x358/0x3d0 mm/kmsan/kmsan.c:457
 kmsan_check_memory+0xd/0x10 mm/kmsan/kmsan_hooks.c:428
 instrument_copy_to_user include/linux/instrumented.h:91 [inline]
 _copy_to_user+0x100/0x1d0 lib/usercopy.c:30
 copy_to_user include/linux/uaccess.h:161 [inline]
 vcs_read+0x17db/0x2340 drivers/tty/vt/vc_screen.c:424
 do_loop_readv_writev fs/read_write.c:734 [inline]
 do_iter_read+0xb84/0xdb0 fs/read_write.c:955
 vfs_readv fs/read_write.c:1073 [inline]
 do_preadv+0x3aa/0x5a0 fs/read_write.c:1165
 __do_sys_preadv fs/read_write.c:1215 [inline]
 __se_sys_preadv+0xc6/0xe0 fs/read_write.c:1210
 __x64_sys_preadv+0x62/0x80 fs/read_write.c:1210
 do_syscall_64+0xb0/0x150 arch/x86/entry/common.c:386
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45c1d9
Code: Bad RIP value.
RSP: 002b:00007f2e7c998c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000127
RAX: ffffffffffffffda RBX: 0000000000023a40 RCX: 000000000045c1d9
RDX: 00000000000001a2 RSI: 00000000200017c0 RDI: 0000000000000005
RBP: 000000000078bf48 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078bf0c
R13: 0000000000c9fb6f R14: 00007f2e7c9999c0 R15: 000000000078bf0c

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
 vc_uniscr_copy_line+0x49b/0x730 drivers/tty/vt/vt.c:572
 vcs_read+0xc72/0x2340 drivers/tty/vt/vc_screen.c:332
 do_loop_readv_writev fs/read_write.c:734 [inline]
 do_iter_read+0xb84/0xdb0 fs/read_write.c:955
 vfs_readv fs/read_write.c:1073 [inline]
 do_preadv+0x3aa/0x5a0 fs/read_write.c:1165
 __do_sys_preadv fs/read_write.c:1215 [inline]
 __se_sys_preadv+0xc6/0xe0 fs/read_write.c:1210
 __x64_sys_preadv+0x62/0x80 fs/read_write.c:1210
 do_syscall_64+0xb0/0x150 arch/x86/entry/common.c:386
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Uninit was created at:
 kmsan_save_stack_with_flags+0x3c/0x90 mm/kmsan/kmsan.c:144
 kmsan_internal_alloc_meta_for_pages mm/kmsan/kmsan_shadow.c:269 [inline]
 kmsan_alloc_page+0xb9/0x180 mm/kmsan/kmsan_shadow.c:293
 __alloc_pages_nodemask+0x56a2/0x5dc0 mm/page_alloc.c:4889
 alloc_pages_current+0x672/0x990 mm/mempolicy.c:2292
 alloc_pages include/linux/gfp.h:545 [inline]
 __vmalloc_area_node mm/vmalloc.c:2489 [inline]
 __vmalloc_node_range+0x875/0x11f0 mm/vmalloc.c:2555
 __vmalloc_node mm/vmalloc.c:2598 [inline]
 vmalloc+0x117/0x130 mm/vmalloc.c:2631
 vc_uniscr_alloc drivers/tty/vt/vt.c:354 [inline]
 vc_do_resize+0x632/0x3290 drivers/tty/vt/vt.c:1222
 vt_resize+0x10e/0x170 drivers/tty/vt/vt.c:1355
 tty_ioctl+0x2ad4/0x2f00 drivers/tty/tty_io.c:2502
 vfs_ioctl fs/ioctl.c:48 [inline]
 ksys_ioctl fs/ioctl.c:753 [inline]
 __do_sys_ioctl fs/ioctl.c:762 [inline]
 __se_sys_ioctl+0x2e9/0x410 fs/ioctl.c:760
 __x64_sys_ioctl+0x4a/0x70 fs/ioctl.c:760
 do_syscall_64+0xb0/0x150 arch/x86/entry/common.c:386
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Bytes 0-127 of 128 are uninitialized
Memory access of size 128 starts at ffff96eeb1987000
=====================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/07/18 18:12 https://github.com/google/kmsan.git master 14525656779e 9c812472 .config console log report ci-upstream-kmsan-gce
* Struck through repros no longer work on HEAD.