================================================================== BUG: KASAN: slab-out-of-bounds in scr_memcpyw include/linux/vt_buffer.h:49 [inline] BUG: KASAN: slab-out-of-bounds in vc_do_resize+0xb8e/0x1a10 drivers/tty/vt/vt.c:1274 Read of size 2 at addr ffff88803a131324 by task syz-executor.5/14056 CPU: 1 PID: 14056 Comm: syz-executor.5 Not tainted 5.7.0-rc2-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+0x1e9/0x30e lib/dump_stack.c:118 print_address_description+0x74/0x5c0 mm/kasan/report.c:382 __kasan_report+0x103/0x1a0 mm/kasan/report.c:511 kasan_report+0x4d/0x80 mm/kasan/common.c:625 Allocated by task 14056: save_stack mm/kasan/common.c:49 [inline] set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc+0x114/0x160 mm/kasan/common.c:495 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x24b/0x330 mm/slab.c:3665 kmalloc include/linux/slab.h:560 [inline] kzalloc+0x1d/0x40 include/linux/slab.h:669 vc_do_resize+0x28e/0x1a10 drivers/tty/vt/vt.c:1211 fbcon_modechanged+0x710/0xd90 drivers/video/fbdev/core/fbcon.c:2989 fb_set_var+0x822/0xcc0 drivers/video/fbdev/core/fbmem.c:1056 fbcon_resize+0x7bb/0xff0 drivers/video/fbdev/core/fbcon.c:2231 resize_screen drivers/tty/vt/vt.c:1150 [inline] vc_do_resize+0x42a/0x1a10 drivers/tty/vt/vt.c:1229 fbcon_modechanged+0x710/0xd90 drivers/video/fbdev/core/fbcon.c:2989 fb_set_var+0x822/0xcc0 drivers/video/fbdev/core/fbmem.c:1056 do_fb_ioctl+0x502/0x6f0 drivers/video/fbdev/core/fbmem.c:1109 vfs_ioctl fs/ioctl.c:47 [inline] ksys_ioctl fs/ioctl.c:763 [inline] __do_sys_ioctl fs/ioctl.c:772 [inline] __se_sys_ioctl+0xf9/0x160 fs/ioctl.c:770 do_syscall_64+0xf3/0x1b0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Freed by task 13095: save_stack mm/kasan/common.c:49 [inline] set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0x125/0x190 mm/kasan/common.c:456 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x220 mm/slab.c:3757 ptr_ring_cleanup include/linux/ptr_ring.h:671 [inline] __tun_detach+0x18d5/0x1cc0 drivers/net/tun.c:694 tun_detach drivers/net/tun.c:707 [inline] tun_chr_close+0xed/0x130 drivers/net/tun.c:3413 __fput+0x2ed/0x750 fs/file_table.c:280 task_work_run+0x147/0x1d0 kernel/task_work.c:123 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop arch/x86/entry/common.c:165 [inline] prepare_exit_to_usermode+0x48e/0x600 arch/x86/entry/common.c:196 entry_SYSCALL_64_after_hwframe+0x49/0xb3 The buggy address belongs to the object at ffff88803a130000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 4900 bytes inside of 8192-byte region [ffff88803a130000, ffff88803a132000) The buggy address belongs to the page: page:ffffea0000e84c00 refcount:1 mapcount:0 mapping:00000000129ac6ea index:0x0 head:ffffea0000e84c00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea0000fbff08 ffffea0000eb4408 ffff8880aa4021c0 raw: 0000000000000000 ffff88803a130000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88803a131200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88803a131280: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff88803a131300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88803a131380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803a131400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================