================================================================== BUG: KASAN: slab-out-of-bounds in vcs_read_buf drivers/tty/vt/vc_screen.c:357 [inline] BUG: KASAN: slab-out-of-bounds in vcs_read+0xaa7/0xb40 drivers/tty/vt/vc_screen.c:449 Write of size 2 at addr ffff888051fac000 by task syz-executor.5/14884 CPU: 1 PID: 14884 Comm: syz-executor.5 Not tainted 5.9.0-rc2-next-20200824-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:0x45d579 Code: 5d b4 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 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fbbc4d78c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000025f00 RCX: 000000000045d579 RDX: 000000000000b400 RSI: 0000000020000200 RDI: 0000000000000003 RBP: 000000000118cf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c R13: 00007ffc3d59321f R14: 00007fbbc4d799c0 R15: 000000000118cf4c Allocated by task 12543: 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 getname_flags.part.0+0x50/0x4f0 fs/namei.c:138 getname_flags fs/namei.c:2646 [inline] user_path_at_empty+0xa1/0x100 fs/namei.c:2646 user_path_at include/linux/namei.h:59 [inline] vfs_statx+0x14e/0x390 fs/stat.c:202 vfs_stat include/linux/fs.h:3170 [inline] __do_sys_newstat+0x91/0x110 fs/stat.c:361 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 12543: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0xd8/0x120 mm/kasan/common.c:422 __cache_free mm/slab.c:3418 [inline] kmem_cache_free.part.0+0x67/0x1f0 mm/slab.c:3693 putname+0xe1/0x120 fs/namei.c:259 filename_lookup+0x3b1/0x560 fs/namei.c:2376 user_path_at include/linux/namei.h:59 [inline] vfs_statx+0x14e/0x390 fs/stat.c:202 vfs_stat include/linux/fs.h:3170 [inline] __do_sys_newstat+0x91/0x110 fs/stat.c:361 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 ffff888051face00 which belongs to the cache names_cache of size 4096 The buggy address is located 3584 bytes to the left of 4096-byte region [ffff888051face00, ffff888051fade00) The buggy address belongs to the page: page:00000000cfe90fcd refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x51fac head:00000000cfe90fcd order:1 compound_mapcount:0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea0001142288 ffffea0002846208 ffff88821bc47a00 raw: 0000000000000000 ffff888051face00 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888051fabf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888051fabf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888051fac000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888051fac080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888051fac100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================