================================================================== 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+0xeb8/0x1e20 drivers/tty/vt/vt.c:1285 Read of size 192 at addr ffff8880a6e43d40 by task syz-executor.0/9467 CPU: 0 PID: 9467 Comm: syz-executor.0 Not tainted 5.8.0-rc6-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+0x202/0x328 lib/dump_stack.c:118 print_address_description+0x66/0x5a0 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report+0x134/0x1d0 mm/kasan/report.c:530 check_memory_region_inline mm/kasan/generic.c:183 [inline] check_memory_region+0x2b6/0x2f0 mm/kasan/generic.c:192 memcpy+0x2d/0x70 mm/kasan/common.c:105 scr_memcpyw include/linux/vt_buffer.h:49 [inline] vc_do_resize+0xeb8/0x1e20 drivers/tty/vt/vt.c:1285 vc_resize+0x4f/0x60 drivers/tty/vt/vt.c:1339 fbcon_modechanged+0x704/0xdf0 drivers/video/fbdev/core/fbcon.c:2990 fbcon_update_vcs+0x31/0x40 drivers/video/fbdev/core/fbcon.c:3048 fb_set_var+0x8f8/0xdc0 drivers/video/fbdev/core/fbmem.c:1056 do_fb_ioctl+0x55e/0x780 drivers/video/fbdev/core/fbmem.c:1109 fb_ioctl+0xb9/0xf0 drivers/video/fbdev/core/fbmem.c:1185 vfs_ioctl fs/ioctl.c:48 [inline] ksys_ioctl fs/ioctl.c:753 [inline] __do_sys_ioctl fs/ioctl.c:762 [inline] __se_sys_ioctl+0x113/0x190 fs/ioctl.c:760 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:760 do_syscall_64+0x76/0xe0 arch/x86/entry/common.c:384 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45b3c9 Code: 2d 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 fb b5 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fcf1c20dc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fcf1c20e6d4 RCX: 000000000045b3c9 RDX: 0000000020000000 RSI: 0000000000004601 RDI: 0000000000000004 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000002cd R14: 00000000004c3e46 R15: 000000000075bf2c Allocated by task 9467: save_stack mm/kasan/common.c:48 [inline] set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc+0x103/0x140 mm/kasan/common.c:494 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:508 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x254/0x340 mm/slab.c:3665 kmalloc include/linux/slab.h:560 [inline] kzalloc+0x21/0x40 include/linux/slab.h:669 vc_do_resize+0x28c/0x1e20 drivers/tty/vt/vt.c:1217 vc_resize+0x4f/0x60 drivers/tty/vt/vt.c:1339 fbcon_modechanged+0x704/0xdf0 drivers/video/fbdev/core/fbcon.c:2990 fbcon_update_vcs+0x31/0x40 drivers/video/fbdev/core/fbcon.c:3048 fb_set_var+0x8f8/0xdc0 drivers/video/fbdev/core/fbmem.c:1056 fbcon_resize+0x819/0x11f0 drivers/video/fbdev/core/fbcon.c:2231 resize_screen drivers/tty/vt/vt.c:1156 [inline] vc_do_resize+0x716/0x1e20 drivers/tty/vt/vt.c:1235 vc_resize+0x4f/0x60 drivers/tty/vt/vt.c:1339 fbcon_modechanged+0x704/0xdf0 drivers/video/fbdev/core/fbcon.c:2990 fbcon_update_vcs+0x31/0x40 drivers/video/fbdev/core/fbcon.c:3048 fb_set_var+0x8f8/0xdc0 drivers/video/fbdev/core/fbmem.c:1056 do_fb_ioctl+0x55e/0x780 drivers/video/fbdev/core/fbmem.c:1109 fb_ioctl+0xb9/0xf0 drivers/video/fbdev/core/fbmem.c:1185 vfs_ioctl fs/ioctl.c:48 [inline] ksys_ioctl fs/ioctl.c:753 [inline] __do_sys_ioctl fs/ioctl.c:762 [inline] __se_sys_ioctl+0x113/0x190 fs/ioctl.c:760 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:760 do_syscall_64+0x76/0xe0 arch/x86/entry/common.c:384 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 6872: save_stack mm/kasan/common.c:48 [inline] set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0x114/0x170 mm/kasan/common.c:455 kasan_slab_free+0xe/0x10 mm/kasan/common.c:464 __cache_free mm/slab.c:3426 [inline] kfree+0x10d/0x220 mm/slab.c:3757 tomoyo_supervisor+0x1080/0x1320 security/tomoyo/common.c:2149 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission security/tomoyo/file.c:587 [inline] tomoyo_path_perm+0x5b4/0x850 security/tomoyo/file.c:838 tomoyo_path_rmdir+0x8f/0xb0 security/tomoyo/tomoyo.c:183 security_path_rmdir+0xd4/0x160 security/security.c:1093 do_rmdir+0x221/0x5a0 fs/namei.c:3763 __do_sys_rmdir fs/namei.c:3784 [inline] __se_sys_rmdir fs/namei.c:3782 [inline] __x64_sys_rmdir+0x3d/0x40 fs/namei.c:3782 do_syscall_64+0x76/0xe0 arch/x86/entry/common.c:384 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8880a6e43c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 320 bytes inside of 512-byte region [ffff8880a6e43c00, ffff8880a6e43e00) The buggy address belongs to the page: page:ffffea00029b90c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00024585c8 ffffea0002a3b088 ffff8880aa400a80 raw: 0000000000000000 ffff8880a6e43000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a6e43c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880a6e43d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880a6e43d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880a6e43e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a6e43e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================