================================================================== BUG: KASAN: use-after-free in vcs_read_buf drivers/tty/vt/vc_screen.c:357 [inline] BUG: KASAN: use-after-free in vcs_read+0xaa7/0xb40 drivers/tty/vt/vc_screen.c:449 Write of size 2 at addr ffff8880a2ab3000 by task syz-executor210/6833 CPU: 0 PID: 6833 Comm: syz-executor210 Not tainted 5.9.0-rc1-next-20200821-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+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 vcs_read_buf drivers/tty/vt/vc_screen.c:357 [inline] vcs_read+0xaa7/0xb40 drivers/tty/vt/vc_screen.c:449 vfs_read+0x1df/0x5a0 fs/read_write.c:479 ksys_read+0x12d/0x250 fs/read_write.c:607 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x440249 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 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 7b 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffd87b6ba88 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440249 RDX: 0000000000002020 RSI: 0000000020000340 RDI: 0000000000000003 RBP: 00000000006ca018 R08: 00000000004002c8 R09: 00000000004002c8 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a50 R13: 0000000000401ae0 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 6752: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:461 slab_post_alloc_hook mm/slab.h:517 [inline] slab_alloc mm/slab.c:3312 [inline] kmem_cache_alloc+0x138/0x3a0 mm/slab.c:3482 vm_area_dup+0x88/0x2b0 kernel/fork.c:355 __split_vma+0xa5/0x560 mm/mmap.c:2748 split_vma+0x95/0xd0 mm/mmap.c:2806 mprotect_fixup+0x71c/0x940 mm/mprotect.c:473 do_mprotect_pkey+0x531/0x940 mm/mprotect.c:613 __do_sys_mprotect mm/mprotect.c:638 [inline] __se_sys_mprotect mm/mprotect.c:635 [inline] __x64_sys_mprotect+0x74/0xb0 mm/mprotect.c:635 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8880a2ab3000 which belongs to the cache vm_area_struct of size 200 The buggy address is located 0 bytes inside of 200-byte region [ffff8880a2ab3000, ffff8880a2ab30c8) The buggy address belongs to the page: page:00000000ff2f3ea3 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880a2ab3e70 pfn:0xa2ab3 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00027ce148 ffffea00029de708 ffff8880aa06f500 raw: ffff8880a2ab3e70 ffff8880a2ab3000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a2ab2f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a2ab2f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880a2ab3000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a2ab3080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc ffff8880a2ab3100: fc fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================