================================================================== BUG: KASAN: slab-out-of-bounds in vcs_scr_readw+0xc2/0xd0 drivers/tty/vt/vt.c:4665 Read of size 2 at addr ffff88808fd092c0 by task syz-executor.5/16659 CPU: 1 PID: 16659 Comm: syz-executor.5 Not tainted 5.4.0-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+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:638 __asan_report_load2_noabort+0x14/0x20 mm/kasan/generic_report.c:133 vcs_scr_readw+0xc2/0xd0 drivers/tty/vt/vt.c:4665 vcs_write+0x646/0xcf0 drivers/tty/vt/vc_screen.c:545 __vfs_write+0x8a/0x110 fs/read_write.c:494 vfs_write+0x268/0x5d0 fs/read_write.c:558 ksys_write+0x14f/0x290 fs/read_write.c:611 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:620 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45a679 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fb4b4929c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045a679 RDX: 0000000020000357 RSI: 0000000020000080 RDI: 0000000000000005 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fb4b492a6d4 R13: 00000000004cb7cd R14: 00000000004e5188 R15: 00000000ffffffff Allocated by task 9090: save_stack+0x23/0x90 mm/kasan/common.c:71 set_track mm/kasan/common.c:79 [inline] __kasan_kmalloc mm/kasan/common.c:512 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:485 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:526 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x163/0x770 mm/slab.c:3665 kmalloc include/linux/slab.h:561 [inline] kzalloc include/linux/slab.h:670 [inline] vc_allocate drivers/tty/vt/vt.c:1098 [inline] vc_allocate+0x3fc/0x760 drivers/tty/vt/vt.c:1066 con_install+0x52/0x410 drivers/tty/vt/vt.c:3229 tty_driver_install_tty drivers/tty/tty_io.c:1228 [inline] tty_init_dev drivers/tty/tty_io.c:1341 [inline] tty_init_dev+0xf7/0x460 drivers/tty/tty_io.c:1318 tty_open_by_driver drivers/tty/tty_io.c:1985 [inline] tty_open+0x4a5/0xbb0 drivers/tty/tty_io.c:2033 chrdev_open+0x245/0x6b0 fs/char_dev.c:414 do_dentry_open+0x4e6/0x1380 fs/open.c:797 vfs_open+0xa0/0xd0 fs/open.c:914 do_last fs/namei.c:3412 [inline] path_openat+0x10e4/0x4710 fs/namei.c:3529 do_filp_open+0x1a1/0x280 fs/namei.c:3559 do_sys_open+0x3fe/0x5d0 fs/open.c:1097 __do_sys_open fs/open.c:1115 [inline] __se_sys_open fs/open.c:1110 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1110 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff88808fd08000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 4800 bytes inside of 8192-byte region [ffff88808fd08000, ffff88808fd0a000) The buggy address belongs to the page: page:ffffea00023f4200 refcount:1 mapcount:0 mapping:ffff8880aa4021c0 index:0x0 compound_mapcount: 0 raw: 00fffe0000010200 ffffea0002959a08 ffffea00024a7508 ffff8880aa4021c0 raw: 0000000000000000 ffff88808fd08000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808fd09180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808fd09200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88808fd09280: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff88808fd09300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808fd09380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================