================================================================== BUG: KASAN: slab-out-of-bounds in vcs_scr_readw+0xc2/0xd0 drivers/tty/vt/vt.c:4665 Read of size 2 at addr ffff8880a54e12c0 by task syz-executor128/8917 CPU: 1 PID: 8917 Comm: syz-executor128 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] __ia32_sys_write+0x71/0xb0 fs/read_write.c:620 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x27b/0xe16 arch/x86/entry/common.c:408 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f2ba39 Code: 00 00 00 89 d3 5b 5e 5f 5d c3 b8 80 96 98 00 eb c4 8b 04 24 c3 8b 1c 24 c3 8b 34 24 c3 8b 3c 24 c3 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:00000000fff02ffc EFLAGS: 00000246 ORIG_RAX: 0000000000000004 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000020006480 RDX: 0000000000001010 RSI: 00000000080f000c RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 8898: 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 ffff8880a54e0000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 4800 bytes inside of 8192-byte region [ffff8880a54e0000, ffff8880a54e2000) The buggy address belongs to the page: page:ffffea0002953800 refcount:1 mapcount:0 mapping:ffff8880aa4021c0 index:0x0 compound_mapcount: 0 raw: 00fffe0000010200 ffffea0002a6a808 ffffea000252f108 ffff8880aa4021c0 raw: 0000000000000000 ffff8880a54e0000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a54e1180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a54e1200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880a54e1280: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff8880a54e1300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a54e1380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================