Process accounting resumed MINIX-fs: mounting unchecked file system, running fsck is recommended ================================================================== BUG: KASAN: use-after-free in alloc_branch fs/minix/itree_common.c:92 [inline] BUG: KASAN: use-after-free in get_block+0x1006/0x1100 fs/minix/itree_common.c:191 minix_free_inode: bit 1 already cleared Write of size 2 at addr ffff888036522b40 by task syz-executor.0/6365 CPU: 1 PID: 6365 Comm: syz-executor.0 Not tainted 4.14.182-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2b9 mm/kasan/report.c:393 alloc_branch fs/minix/itree_common.c:92 [inline] get_block+0x1006/0x1100 fs/minix/itree_common.c:191 minix_get_block+0xd6/0x100 fs/minix/inode.c:379 __block_write_begin_int+0x33a/0x1000 fs/buffer.c:2038 __block_write_begin fs/buffer.c:2088 [inline] block_write_begin+0x58/0x260 fs/buffer.c:2147 minix_write_begin+0x35/0xc0 fs/minix/inode.c:415 generic_perform_write+0x1c9/0x420 mm/filemap.c:3047 __generic_file_write_iter+0x227/0x590 mm/filemap.c:3172 generic_file_write_iter+0x36f/0x650 mm/filemap.c:3200 call_write_iter include/linux/fs.h:1778 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x44e/0x630 fs/read_write.c:482 __kernel_write+0xf5/0x330 fs/read_write.c:501 do_acct_process+0xb49/0xf60 kernel/acct.c:520 acct_pin_kill+0x28/0xe0 kernel/acct.c:174 pin_kill+0x147/0x650 fs/fs_pin.c:50 mnt_pin_kill+0x62/0x170 fs/fs_pin.c:87 cleanup_mnt+0x110/0x140 fs/namespace.c:1180 task_work_run+0x113/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45f497 RSP: 002b:00007fffb18f3f48 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000046c2e RCX: 000000000045f497 RDX: 00000000004031d8 RSI: 0000000000000002 RDI: 00007fffb18f3ff0 RBP: 000000000000023f R08: 0000000000000000 R09: 000000000000000b R10: 0000000000000005 R11: 0000000000000246 R12: 00007fffb18f5080 R13: 0000000001cdd940 R14: 0000000000000000 R15: 00007fffb18f5080 The buggy address belongs to the page: page:ffffea0000d94880 count:0 mapcount:-127 mapping: (null) index:0x1 flags: 0xfffe0000000000() raw: 00fffe0000000000 0000000000000000 0000000000000001 00000000ffffff80 raw: ffffea0000e4b820 ffffea0000e48f20 0000000000000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888036522a00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888036522a80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888036522b00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888036522b80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888036522c00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== MINIX-fs: mounting unchecked file system, running fsck is recommended Process accounting resumed