Process accounting resumed ================================================================== BUG: KASAN: use-after-free in alloc_branch fs/minix/itree_common.c:92 [inline] BUG: KASAN: use-after-free in get_block+0x11e1/0x1300 fs/minix/itree_common.c:191 Write of size 2 at addr ffff8880362ce726 by task syz-executor.4/6863 CPU: 1 PID: 6863 Comm: syz-executor.4 Not tainted 4.19.115-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+0x188/0x20d lib/dump_stack.c:118 print_address_description.cold+0x7c/0x212 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+0x88/0x2b9 mm/kasan/report.c:396 alloc_branch fs/minix/itree_common.c:92 [inline] get_block+0x11e1/0x1300 fs/minix/itree_common.c:191 minix_get_block+0xe5/0x110 fs/minix/inode.c:379 __block_write_begin_int+0x480/0x17a0 fs/buffer.c:1967 __block_write_begin fs/buffer.c:2017 [inline] block_write_begin+0x58/0x2e0 fs/buffer.c:2076 minix_write_begin+0x35/0xe0 fs/minix/inode.c:415 generic_perform_write+0x1f8/0x4d0 mm/filemap.c:3162 __generic_file_write_iter+0x24c/0x610 mm/filemap.c:3287 generic_file_write_iter+0x37f/0x729 mm/filemap.c:3315 call_write_iter include/linux/fs.h:1821 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x512/0x760 fs/read_write.c:487 __kernel_write+0x109/0x370 fs/read_write.c:506 do_acct_process+0xcd8/0x10e0 kernel/acct.c:520 acct_pin_kill+0x29/0xf0 kernel/acct.c:174 pin_kill+0x17a/0x7e0 fs/fs_pin.c:50 mnt_pin_kill+0x6c/0x1c0 fs/fs_pin.c:87 cleanup_mnt+0x116/0x150 fs/namespace.c:1095 task_work_run+0x13f/0x1b0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x25a/0x2b0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45f2b7 Code: 64 89 04 25 d0 02 00 00 58 5f ff d0 48 89 c7 e8 2f be ff ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 4d 8c fb ff c3 66 2e 0f 1f 84 00 00 00 00 netlink: 45 bytes leftover after parsing attributes in process `syz-executor.2'. RSP: 002b:00007ffe03ebade8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 000000000003ae6f RCX: 000000000045f2b7 RDX: 0000000000402f88 RSI: 0000000000000002 RDI: 00007ffe03ebae90 RBP: 000000000000002c R08: 0000000000000000 R09: 000000000000000a R10: 0000000000000005 R11: 0000000000000246 R12: 00007ffe03ebbf20 R13: 00000000024c5940 R14: 0000000000000000 R15: 00007ffe03ebbf20 The buggy address belongs to the page: page:ffffea0000d8b380 count:0 mapcount:-128 mapping:0000000000000000 index:0x1 flags: 0xfffe0000000000() raw: 00fffe0000000000 ffffea0000d8d808 ffffea0000e04f08 0000000000000000 raw: 0000000000000001 0000000000000001 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880362ce600: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880362ce680: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8880362ce700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880362ce780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880362ce800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================