================================================================== BUG: KASAN: use-after-free in __fb_pad_aligned_buffer include/linux/fb.h:674 [inline] BUG: KASAN: use-after-free in bit_putcs_aligned drivers/video/fbdev/core/bitblit.c:96 [inline] BUG: KASAN: use-after-free in bit_putcs+0xd5d/0xf10 drivers/video/fbdev/core/bitblit.c:185 Read of size 1 at addr ffff8880a8d090fc by task syz-executor.2/17859 CPU: 0 PID: 17859 Comm: syz-executor.2 Not tainted 4.19.96-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.cold+0x7c/0x20d mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold+0x8c/0x2ba mm/kasan/report.c:396 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:430 __fb_pad_aligned_buffer include/linux/fb.h:674 [inline] bit_putcs_aligned drivers/video/fbdev/core/bitblit.c:96 [inline] bit_putcs+0xd5d/0xf10 drivers/video/fbdev/core/bitblit.c:185 fbcon_putcs+0x42b/0x4f0 drivers/video/fbdev/core/fbcon.c:1320 con_flush drivers/tty/vt/vt.c:2522 [inline] do_con_write.part.0+0xeb9/0x1eb0 drivers/tty/vt/vt.c:2775 do_con_write drivers/tty/vt/vt.c:2541 [inline] con_write+0x46/0xd0 drivers/tty/vt/vt.c:3110 process_output_block drivers/tty/n_tty.c:593 [inline] n_tty_write+0x3f9/0x1140 drivers/tty/n_tty.c:2331 do_tty_write drivers/tty/tty_io.c:960 [inline] tty_write+0x458/0x7a0 drivers/tty/tty_io.c:1044 do_loop_readv_writev fs/read_write.c:704 [inline] do_loop_readv_writev fs/read_write.c:688 [inline] do_iter_write fs/read_write.c:962 [inline] do_iter_write+0x488/0x5f0 fs/read_write.c:941 vfs_writev+0x1b3/0x2f0 fs/read_write.c:1005 do_writev+0x15e/0x370 fs/read_write.c:1040 __do_sys_writev fs/read_write.c:1113 [inline] __se_sys_writev fs/read_write.c:1110 [inline] __x64_sys_writev+0x75/0xb0 fs/read_write.c:1110 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45af49 Code: ad 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f8883533c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045af49 RDX: 0000000000000001 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f88835346d4 R13: 00000000004c957b R14: 00000000004e8c70 R15: 00000000ffffffff Allocated by task 8116: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc mm/kasan/kasan.c:553 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:531 kasan_slab_alloc+0xf/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x700 mm/slab.c:3559 anon_vma_chain_alloc mm/rmap.c:129 [inline] anon_vma_clone+0xde/0x480 mm/rmap.c:269 anon_vma_fork+0x8f/0x4a0 mm/rmap.c:332 dup_mmap kernel/fork.c:494 [inline] dup_mm kernel/fork.c:1278 [inline] copy_mm kernel/fork.c:1334 [inline] copy_process.part.0+0x34e5/0x7a30 kernel/fork.c:1887 copy_process kernel/fork.c:1684 [inline] _do_fork+0x257/0xfd0 kernel/fork.c:2197 __do_sys_clone kernel/fork.c:2304 [inline] __se_sys_clone kernel/fork.c:2298 [inline] __x64_sys_clone+0xbf/0x150 kernel/fork.c:2298 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 17513: save_stack+0x45/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3503 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3765 anon_vma_chain_free mm/rmap.c:134 [inline] unlink_anon_vmas+0x2ba/0x860 mm/rmap.c:401 free_pgtables+0x1af/0x2f0 mm/memory.c:640 exit_mmap+0x2d1/0x530 mm/mmap.c:3092 __mmput kernel/fork.c:1005 [inline] mmput+0x15f/0x4c0 kernel/fork.c:1026 exec_mmap fs/exec.c:1043 [inline] flush_old_exec+0x8d9/0x1c20 fs/exec.c:1276 load_elf_binary+0x9c0/0x53a0 fs/binfmt_elf.c:869 search_binary_handler fs/exec.c:1653 [inline] search_binary_handler+0x179/0x570 fs/exec.c:1631 exec_binprm fs/exec.c:1695 [inline] __do_execve_file.isra.0+0x1227/0x2150 fs/exec.c:1819 do_execveat_common fs/exec.c:1866 [inline] do_execve fs/exec.c:1883 [inline] __do_sys_execve fs/exec.c:1964 [inline] __se_sys_execve fs/exec.c:1959 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:1959 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a8d090e0 which belongs to the cache anon_vma_chain of size 80 The buggy address is located 28 bytes inside of 80-byte region [ffff8880a8d090e0, ffff8880a8d09130) The buggy address belongs to the page: page:ffffea0002a34240 count:1 mapcount:0 mapping:ffff88821bc334c0 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffffea000248dfc8 ffffea0002225f48 ffff88821bc334c0 raw: 0000000000000000 ffff8880a8d09000 0000000100000024 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a8d08f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a8d09000: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fb fb >ffff8880a8d09080: fb fb fb fb fb fb fb fb fc fc fc fc fb fb fb fb ^ ffff8880a8d09100: fb fb fb fb fb fb fc fc fc fc fb fb fb fb fb fb ffff8880a8d09180: fb fb fb fb fc fc fc fc fb fb fb fb fb fb fb fb ==================================================================