syzbot


KMSAN: kernel-infoleak in vcs_read (2)

Status: upstream: reported C repro on 2019/12/04 15:25
Reported-by: syzbot+31a641689d43387f05d3@syzkaller.appspotmail.com
Fix commit: af77c56aa353 tty: vt: initialize unicode screen buffer
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 1150d, last: 14h13m
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: kernel-infoleak in vcs_read C 531 1684d 1694d 9/24 fixed on 2018/07/13 11:20
upstream KMSAN: kernel-infoleak in _copy_to_iter (7) btrfs ntfs3 erofs udf C 135534 now 325d 23/24 internal: reported C repro on 2022/03/09 07:32
upstream KMSAN: uninit-value in set_selection_kernel 428 155d 1051d 0/24 auto-obsoleted due to no activity on 2022/12/23 21:08
Last patch testing requests:
Created Duration User Patch Repo Result
2022/07/19 06:49 7m penguin-kernel@i-love.sakura.ne.jp patch https://github.com/google/kmsan.git master error
2021/03/31 15:50 32m phil@philpotter.co.uk https://github.com/google/kmsan.git master OK
2020/09/30 20:23 3m anant.thazhemadam@gmail.com patch https://github.com/google/kmsan.git master error
2020/09/30 18:10 18m anant.thazhemadam@gmail.com patch https://github.com/google/kmsan.git master report log
2020/09/30 01:00 3m anant.thazhemadam@gmail.com patch https://github.com/google/kmsan.git master error

Sample crash report:
=====================================================
BUG: KMSAN: kernel-infoleak in kmsan_copy_to_user+0x81/0x90 mm/kmsan/kmsan_hooks.c:253
CPU: 0 PID: 8471 Comm: syz-executor446 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+0x21c/0x280 lib/dump_stack.c:118
 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:121
 kmsan_internal_check_memory+0x19d/0x3d0 mm/kmsan/kmsan.c:443
 kmsan_copy_to_user+0x81/0x90 mm/kmsan/kmsan_hooks.c:253
 instrument_copy_to_user include/linux/instrumented.h:91 [inline]
 _copy_to_user+0x18e/0x260 lib/usercopy.c:33
 copy_to_user include/linux/uaccess.h:170 [inline]
 vcs_read+0x1c6f/0x2920 drivers/tty/vt/vc_screen.c:424
 vfs_read+0x577/0x14d0 fs/read_write.c:479
 ksys_read+0x275/0x500 fs/read_write.c:607
 __do_sys_read fs/read_write.c:617 [inline]
 __se_sys_read+0x92/0xb0 fs/read_write.c:615
 __x64_sys_read+0x4a/0x70 fs/read_write.c:615
 do_syscall_64+0xad/0x160 arch/x86/entry/common.c:386
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x4453c9
Code: Bad RIP value.
RSP: 002b:00007fffa3c8af98 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000004453c9
RDX: 0000000000002020 RSI: 0000000020000100 RDI: 0000000000000003
RBP: 0000000000022239 R08: 00000000004002e0 R09: 00000000004002e0
R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000402590
R13: 0000000000402620 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
 vc_uniscr_copy_line+0x545/0x800 drivers/tty/vt/vt.c:572
 vcs_read+0x107d/0x2920 drivers/tty/vt/vc_screen.c:332
 vfs_read+0x577/0x14d0 fs/read_write.c:479
 ksys_read+0x275/0x500 fs/read_write.c:607
 __do_sys_read fs/read_write.c:617 [inline]
 __se_sys_read+0x92/0xb0 fs/read_write.c:615
 __x64_sys_read+0x4a/0x70 fs/read_write.c:615
 do_syscall_64+0xad/0x160 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+0xc5/0x1a0 mm/kmsan/kmsan_shadow.c:293
 __alloc_pages_nodemask+0xdf0/0x1030 mm/page_alloc.c:4889
 alloc_pages_current+0x685/0xb50 mm/mempolicy.c:2292
 alloc_pages include/linux/gfp.h:545 [inline]
 __vmalloc_area_node mm/vmalloc.c:2489 [inline]
 __vmalloc_node_range+0x989/0x1400 mm/vmalloc.c:2555
 __vmalloc_node mm/vmalloc.c:2598 [inline]
 vmalloc+0xe0/0xf0 mm/vmalloc.c:2631
 vc_uniscr_alloc drivers/tty/vt/vt.c:354 [inline]
 vc_do_resize+0x73e/0x38f0 drivers/tty/vt/vt.c:1222
 vc_resize+0xc3/0xe0 drivers/tty/vt/vt.c:1334
 fbcon_modechanged+0xdc1/0x1320 drivers/video/fbdev/core/fbcon.c:2990
 fbcon_update_vcs+0x86/0xa0 drivers/video/fbdev/core/fbcon.c:3048
 fb_set_var+0x1420/0x1850 drivers/video/fbdev/core/fbmem.c:1056
 do_fb_ioctl+0xc00/0x1150 drivers/video/fbdev/core/fbmem.c:1109
 fb_ioctl+0x1e4/0x210 drivers/video/fbdev/core/fbmem.c:1185
 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+0x319/0x4d0 fs/ioctl.c:760
 __x64_sys_ioctl+0x4a/0x70 fs/ioctl.c:760
 do_syscall_64+0xad/0x160 arch/x86/entry/common.c:386
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Bytes 0-319 of 640 are uninitialized
Memory access of size 640 starts at ffff8880bbb25000
Data copied to user address 0000000020000100
=====================================================

Crashes (1555):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kmsan-gce 2020/09/06 04:03 https://github.com/google/kmsan.git master 3b3ea6028136 abf9ba4f .config console log report syz C
ci-upstream-kmsan-gce 2022/08/25 04:39 https://github.com/google/kmsan.git master 1b070a5d1a2c 514514f6 .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/24 07:34 https://github.com/google/kmsan.git master 1b070a5d1a2c cea8b0f7 .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/24 05:16 https://github.com/google/kmsan.git master 1b070a5d1a2c cea8b0f7 .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/23 04:20 https://github.com/google/kmsan.git master 1b070a5d1a2c 26a13b38 .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/22 17:42 https://github.com/google/kmsan.git master 1b070a5d1a2c 26a13b38 .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/22 12:39 https://github.com/google/kmsan.git master 1b070a5d1a2c 26a13b38 .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/21 09:32 https://github.com/google/kmsan.git master 1b070a5d1a2c 26a13b38 .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/18 02:13 https://github.com/google/kmsan.git master 1b070a5d1a2c d58e263f .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/17 00:04 https://github.com/google/kmsan.git master 1b070a5d1a2c 7a7cb304 .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/16 06:47 https://github.com/google/kmsan.git master 1b070a5d1a2c 7a7cb304 .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/15 20:44 https://github.com/google/kmsan.git master 1b070a5d1a2c 8dfcaa3d .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/15 18:43 https://github.com/google/kmsan.git master 1b070a5d1a2c 8dfcaa3d .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/14 14:22 https://github.com/google/kmsan.git master 1b070a5d1a2c 8dfcaa3d .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/14 09:47 https://github.com/google/kmsan.git master 1b070a5d1a2c 8dfcaa3d .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/13 15:33 https://github.com/google/kmsan.git master 1b070a5d1a2c 8dfcaa3d .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/13 05:03 https://github.com/google/kmsan.git master 1b070a5d1a2c 8dfcaa3d .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/12 11:44 https://github.com/google/kmsan.git master 1b070a5d1a2c 402cd70d .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/11 13:20 https://github.com/google/kmsan.git master 1b070a5d1a2c 787ed7e0 .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/08 19:34 https://github.com/google/kmsan.git master 168a92de0739 88e3a122 .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce-386 2022/08/12 18:23 https://github.com/google/kmsan.git master 1b070a5d1a2c 402cd70d .config console log report info KMSAN: kernel-infoleak in vcs_read
ci-upstream-kmsan-gce 2022/08/25 07:01 https://github.com/google/kmsan.git master 1b070a5d1a2c 514514f6 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/22 13:47 https://github.com/google/kmsan.git master 1b070a5d1a2c 26a13b38 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/22 10:14 https://github.com/google/kmsan.git master 1b070a5d1a2c 26a13b38 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/21 13:35 https://github.com/google/kmsan.git master 1b070a5d1a2c 26a13b38 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/18 22:49 https://github.com/google/kmsan.git master 1b070a5d1a2c 26a13b38 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/17 21:27 https://github.com/google/kmsan.git master 1b070a5d1a2c 4e72d229 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/17 18:52 https://github.com/google/kmsan.git master 1b070a5d1a2c 4e72d229 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/17 04:45 https://github.com/google/kmsan.git master 1b070a5d1a2c 4e72d229 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/16 22:51 https://github.com/google/kmsan.git master 1b070a5d1a2c 7a7cb304 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/16 17:28 https://github.com/google/kmsan.git master 1b070a5d1a2c 7a7cb304 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/16 02:29 https://github.com/google/kmsan.git master 1b070a5d1a2c 8dfcaa3d .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/15 23:55 https://github.com/google/kmsan.git master 1b070a5d1a2c 8dfcaa3d .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/15 02:17 https://github.com/google/kmsan.git master 1b070a5d1a2c 8dfcaa3d .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/15 01:11 https://github.com/google/kmsan.git master 1b070a5d1a2c 8dfcaa3d .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/14 17:20 https://github.com/google/kmsan.git master 1b070a5d1a2c 8dfcaa3d .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/11 08:16 https://github.com/google/kmsan.git master 1b070a5d1a2c a6201f11 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/11 06:38 https://github.com/google/kmsan.git master 1b070a5d1a2c a6201f11 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/09 18:15 https://github.com/google/kmsan.git master 1b070a5d1a2c c2a623d6 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2022/08/08 09:54 https://github.com/google/kmsan.git master 168a92de0739 88e3a122 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce 2021/01/17 13:51 https://github.com/google/kmsan.git master 73d62e81b476 813be542 .config console log report info
ci-upstream-kmsan-gce 2019/12/04 14:52 https://github.com/google/kmsan.git master 141b13f7780f b2088328 .config console log report
ci-upstream-kmsan-gce-386 2023/01/27 21:13 https://github.com/google/kmsan.git master 41c66f470616 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KMSAN: kernel-infoleak in nilfs_ioctl_wrap_copy
ci-upstream-kmsan-gce-386 2023/01/27 19:54 https://github.com/google/kmsan.git master 41c66f470616 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KMSAN: kernel-infoleak in nilfs_ioctl_wrap_copy
ci-upstream-kmsan-gce-386 2023/01/18 01:45 https://github.com/google/kmsan.git master e919e2b1bc1c aedf5331 .config console log report info [disk image] [vmlinux] [kernel image] KMSAN: kernel-infoleak in nilfs_ioctl_wrap_copy
ci-upstream-kmsan-gce-386 2022/12/23 12:26 https://github.com/google/kmsan.git master 5c6259d6d19f 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] KMSAN: kernel-infoleak in nilfs_ioctl_wrap_copy
ci-upstream-kmsan-gce-386 2022/12/07 16:51 https://github.com/google/kmsan.git master 30d2727189c5 d88f3abb .config console log report info [disk image] [vmlinux] [kernel image] KMSAN: kernel-infoleak in nilfs_ioctl_wrap_copy
ci-upstream-kmsan-gce-386 2022/12/07 16:50 https://github.com/google/kmsan.git master 30d2727189c5 d88f3abb .config console log report info [disk image] [vmlinux] [kernel image] KMSAN: kernel-infoleak in nilfs_ioctl_wrap_copy
ci-upstream-kmsan-gce-386 2022/08/24 22:56 https://github.com/google/kmsan.git master 1b070a5d1a2c 514514f6 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce-386 2022/08/13 09:40 https://github.com/google/kmsan.git master 1b070a5d1a2c 8dfcaa3d .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce-386 2022/08/10 15:45 https://github.com/google/kmsan.git master 1b070a5d1a2c a6201f11 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
ci-upstream-kmsan-gce-386 2022/08/09 04:27 https://github.com/google/kmsan.git master 1b070a5d1a2c da700653 .config console log report info KMSAN: kernel-infoleak-after-free in vcs_read
* Struck through repros no longer work on HEAD.