EXT4-fs error (device loop0): ext4_free_branches:1030: inode #13: comm syz-executor550: invalid indirect mapped block 8 (level 2) EXT4-fs (loop0): Remounting filesystem read-only EXT4-fs (loop0): 1 truncate cleaned up EXT4-fs (loop0): mounted filesystem without journal. Opts: max_batch_time=0x0000000000008001,errors=continue,errors=remount-ro,minixdf,jqfmt=vfsv0,usrjquota=.smackfsfloor=ext4. Quota mode: writeback. ================================================================== BUG: KASAN: use-after-free in ext4_search_dir+0xee/0x1b0 fs/ext4/namei.c:1544 Read of size 1 at addr ffff888069487595 by task syz-executor550/3569 CPU: 1 PID: 3569 Comm: syz-executor550 Not tainted 5.15.167-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 ext4_search_dir+0xee/0x1b0 fs/ext4/namei.c:1544 ext4_find_inline_entry+0x4b6/0x5e0 fs/ext4/inline.c:1704 __ext4_find_entry+0x2b0/0x1b20 fs/ext4/namei.c:1617 ext4_lookup_entry fs/ext4/namei.c:1772 [inline] ext4_lookup+0x3c6/0xaa0 fs/ext4/namei.c:1840 lookup_one_qstr_excl+0x117/0x240 fs/namei.c:1563 filename_create+0x293/0x530 fs/namei.c:3836 do_mkdirat+0xb3/0x520 fs/namei.c:4080 __do_sys_mkdirat fs/namei.c:4105 [inline] __se_sys_mkdirat fs/namei.c:4103 [inline] __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4103 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fe49710d649 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 1f 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fffa692cab8 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fe49710d649 RDX: 0000000000000000 RSI: 00000000200003c0 RDI: 0000000000000007 RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000003 R10: 00000000000001be R11: 0000000000000246 R12: 00007fe497151218 R13: 0000000000000000 R14: 431bde82d7b634db R15: 00007fffa692cb30 The buggy address belongs to the page: page:ffffea0001a521c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x69487 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001a52208 ffffea0001a52188 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Movable, gfp_mask 0x8(__GFP_MOVABLE), pid 1, ts 14737508478, free_ts 15896594613 split_map_pages+0x246/0x510 mm/compaction.c:99 isolate_freepages_range+0x47c/0x4e0 mm/compaction.c:749 alloc_contig_range+0xc2b/0xf90 mm/page_alloc.c:9216 __alloc_contig_pages mm/page_alloc.c:9240 [inline] alloc_contig_pages+0x3ea/0x4e0 mm/page_alloc.c:9320 debug_vm_pgtable_alloc_huge_page+0xb9/0x110 mm/debug_vm_pgtable.c:1085 init_args+0xc62/0xf50 mm/debug_vm_pgtable.c:1207 debug_vm_pgtable+0xaa/0x470 mm/debug_vm_pgtable.c:1245 do_one_initcall+0x22b/0x7a0 init/main.c:1302 do_initcall_level+0x157/0x210 init/main.c:1375 do_initcalls+0x49/0x90 init/main.c:1391 kernel_init_freeable+0x425/0x5c0 init/main.c:1615 kernel_init+0x19/0x290 init/main.c:1506 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396 free_contig_range+0x95/0xf0 mm/page_alloc.c:9342 destroy_args+0xfe/0x980 mm/debug_vm_pgtable.c:1018 debug_vm_pgtable+0x40d/0x470 mm/debug_vm_pgtable.c:1331 do_one_initcall+0x22b/0x7a0 init/main.c:1302 do_initcall_level+0x157/0x210 init/main.c:1375 do_initcalls+0x49/0x90 init/main.c:1391 kernel_init_freeable+0x425/0x5c0 init/main.c:1615 kernel_init+0x19/0x290 init/main.c:1506 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff888069487480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888069487500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888069487580: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888069487600: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888069487680: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================