EXT4-fs error (device loop0): htree_dirblock_to_tree:1080: inode #2: block 21: comm syz-executor: bad entry in directory:[ 148.970295][ T6442] EXT4-fs error (device loop0): htree_dirblock_to_tree:1080: inode #2: block 21: comm syz-executor: bad entry in directory: directory entry overrun - offset=1004, inode=0, rec_len=1000, size=1024 fake=0 ================================================================== BUG: KASAN: use-after-free in ext4_read_inline_data+0x1d0/0x2c0 fs/ext4/inline.c:214 Read of size 324 at addr ffff88804a29fc05 by task syz-executor/6442 CPU: 0 UID: 0 PID: 6442 Comm: syz-executor Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x264/0x2c0 mm/kasan/generic.c:200 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 ext4_read_inline_data+0x1d0/0x2c0 fs/ext4/inline.c:214 ext4_inlinedir_to_tree+0x3fb/0xdc0 fs/ext4/inline.c:1294 ext4_htree_fill_tree+0x50e/0x1230 fs/ext4/namei.c:1179 ext4_dx_readdir fs/ext4/dir.c:601 [inline] ext4_readdir+0x332b/0x41b0 fs/ext4/dir.c:147 iterate_dir+0x3a5/0x580 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:412 [inline] __se_sys_getdents64+0xf1/0x280 fs/readdir.c:397 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f354232ce33 Code: c7 c0 e8 ff ff ff 64 c7 00 16 00 00 00 31 c0 eb 9e e8 c1 a1 fd ff 90 b8 ff ff ff 7f 48 39 c2 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 c7 c2 e8 ff ff ff f7 d8 RSP: 002b:00007ffd03c91018 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 0000555555935a70 RCX: 00007f354232ce33 RDX: 0000000000008000 RSI: 0000555555935aa0 RDI: 0000000000000006 RBP: 0000555555935aa0 R08: 00007f3542483ca0 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000293 R12: 0000555555935a74 R13: ffffffffffffffe8 R14: 0000000000000016 R15: 00007ffd03c943a0 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x2 pfn:0x4a29f flags: 0x80000000000000(node=0|zone=1) raw: 0080000000000000 ffffea0001581b08 ffffea000123f308 0000000000000000 raw: 0000000000000002 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 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 6452, tgid 6452 (dhcpcd-run-hook), ts 144683295515, free_ts 145006604424 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1889 prep_new_page mm/page_alloc.c:1897 [inline] get_page_from_freelist+0x28bb/0x2950 mm/page_alloc.c:3962 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5250 alloc_pages_mpol+0xd1/0x380 mm/mempolicy.c:2490 folio_alloc_mpol_noprof mm/mempolicy.c:2509 [inline] vma_alloc_folio_noprof+0xea/0x290 mm/mempolicy.c:2544 folio_prealloc mm/memory.c:-1 [inline] wp_page_copy mm/memory.c:3780 [inline] do_wp_page+0x127a/0x49d0 mm/memory.c:4241 handle_pte_fault mm/memory.c:6333 [inline] __handle_mm_fault mm/memory.c:6455 [inline] handle_mm_fault+0x9f5/0x13c0 mm/memory.c:6624 do_user_addr_fault+0xa73/0x1340 arch/x86/mm/fault.c:1334 handle_page_fault arch/x86/mm/fault.c:1474 [inline] exc_page_fault+0x6a/0xc0 arch/x86/mm/fault.c:1527 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618 page last free pid 6452 tgid 6452 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1433 [inline] free_unref_folios+0xe7b/0x1c70 mm/page_alloc.c:3040 folios_put_refs+0x56f/0x680 mm/swap.c:1002 free_pages_and_swap_cache+0x537/0x5b0 mm/swap_state.c:426 __tlb_batch_free_encoded_pages mm/mmu_gather.c:138 [inline] tlb_batch_pages_flush mm/mmu_gather.c:151 [inline] tlb_flush_mmu_free mm/mmu_gather.c:398 [inline] tlb_flush_mmu+0x6d3/0xa30 mm/mmu_gather.c:405 tlb_finish_mmu+0xf9/0x230 mm/mmu_gather.c:530 exit_mmap+0x498/0xa10 mm/mmap.c:1315 __mmput+0xcb/0x3d0 kernel/fork.c:1175 exit_mm+0x168/0x220 kernel/exit.c:581 do_exit+0x6a2/0x23c0 kernel/exit.c:964 do_group_exit+0x21b/0x2d0 kernel/exit.c:1118 __do_sys_exit_group kernel/exit.c:1129 [inline] __se_sys_exit_group kernel/exit.c:1127 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1127 x64_sys_call+0x221a/0x2240 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88804a29fb00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88804a29fb80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88804a29fc00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88804a29fc80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88804a29fd00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================