Process accounting resumed ================================================================== BUG: KASAN: use-after-free in add_chain fs/minix/itree_common.c:14 [inline] BUG: KASAN: use-after-free in get_branch fs/minix/itree_common.c:52 [inline] BUG: KASAN: use-after-free in get_block+0x1103/0x13a0 fs/minix/itree_common.c:160 Read of size 2 at addr ffff8880666b118a by task syz-executor.1/22878 CPU: 1 PID: 22878 Comm: syz-executor.1 Not tainted 5.8.0-rc4-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/0x436 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 add_chain fs/minix/itree_common.c:14 [inline] get_branch fs/minix/itree_common.c:52 [inline] get_block+0x1103/0x13a0 fs/minix/itree_common.c:160 minix_get_block+0xe5/0x110 fs/minix/inode.c:376 __block_write_begin_int+0x464/0x1a80 fs/buffer.c:2012 __block_write_begin fs/buffer.c:2062 [inline] block_write_begin+0x58/0x2e0 fs/buffer.c:2121 minix_write_begin+0x35/0x220 fs/minix/inode.c:412 generic_perform_write+0x20a/0x4f0 mm/filemap.c:3318 __generic_file_write_iter+0x24b/0x610 mm/filemap.c:3447 generic_file_write_iter+0x3a6/0x5c0 mm/filemap.c:3479 call_write_iter include/linux/fs.h:1908 [inline] new_sync_write+0x422/0x650 fs/read_write.c:503 __kernel_write+0x3f8/0x500 fs/read_write.c:530 do_acct_process+0xcc2/0x10c0 kernel/acct.c:522 slow_acct_process kernel/acct.c:581 [inline] acct_process+0x3b7/0x4e6 kernel/acct.c:607 do_exit+0x197e/0x2a40 kernel/exit.c:795 do_group_exit+0x125/0x310 kernel/exit.c:903 get_signal+0x40b/0x1ee0 kernel/signal.c:2743 do_signal+0x82/0x2520 arch/x86/kernel/signal.c:810 exit_to_usermode_loop arch/x86/entry/common.c:235 [inline] __prepare_exit_to_usermode+0x156/0x1f0 arch/x86/entry/common.c:269 do_syscall_64+0x6c/0xe0 arch/x86/entry/common.c:393 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45cba9 Code: Bad RIP value. RSP: 002b:00007fb9a147bcf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000078bfa8 RCX: 000000000045cba9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000078bfa8 RBP: 000000000078bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078bfac R13: 00007ffc2d8fe3af R14: 00007fb9a147c9c0 R15: 000000000078bfac The buggy address belongs to the page: page:ffffea000199ac40 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 flags: 0xfffe0000000000() raw: 00fffe0000000000 ffffea00021a7888 ffffea0001de0f88 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880666b1080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880666b1100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8880666b1180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880666b1200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880666b1280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================