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+0x1c9/0x2b0 fs/ext4/inline.c:213 Read of size 324 at addr ffff8880528ddc05 by task syz-executor/6345 CPU: 1 UID: 0 PID: 6345 Comm: syz-executor Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 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+0x1c9/0x2b0 fs/ext4/inline.c:213 ext4_inlinedir_to_tree+0x32e/0xe20 fs/ext4/inline.c:1303 ext4_htree_fill_tree+0x52b/0x1180 fs/ext4/namei.c:1179 ext4_dx_readdir fs/ext4/dir.c:617 [inline] ext4_readdir+0x34e6/0x4260 fs/ext4/dir.c:148 iterate_dir+0x2f1/0x4e0 fs/readdir.c:110 __do_sys_getdents64 fs/readdir.c:399 [inline] __se_sys_getdents64+0xf1/0x280 fs/readdir.c:384 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f2a0930ce33 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:00007ffd38e43058 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 000055555f911a90 RCX: 00007f2a0930ce33 RDX: 0000000000008000 RSI: 000055555f911ac0 RDI: 0000000000000006 RBP: 000055555f911ac0 R08: 00007f2a09463ca0 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000293 R12: 000055555f911a94 R13: ffffffffffffffe8 R14: 0000000000000016 R15: 00007ffd38e463e0 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x7f7f33053 pfn:0x528dd flags: 0x80000000000000(node=0|zone=1) raw: 0080000000000000 ffffea00014a4048 ffffea00014a4108 0000000000000000 raw: 00000007f7f33053 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 6434, tgid 6434 (sed), ts 186701763275 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x2591/0x2600 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x230/0x5c0 mm/page_alloc.c:5436 alloc_pages_mpol+0xd4/0x280 mm/mempolicy.c:2486 folio_alloc_mpol_noprof+0x3b/0x1e0 mm/mempolicy.c:2505 vma_alloc_folio_noprof+0xe1/0x1e0 mm/mempolicy.c:2540 folio_prealloc mm/memory.c:-1 [inline] wp_page_copy mm/memory.c:4007 [inline] do_wp_page+0x121f/0x3d20 mm/memory.c:4472 handle_pte_fault mm/memory.c:6582 [inline] __handle_mm_fault mm/memory.c:6707 [inline] handle_mm_fault+0xd69/0x28c0 mm/memory.c:6876 do_user_addr_fault+0xa4f/0x1340 arch/x86/mm/fault.c:1343 handle_page_fault arch/x86/mm/fault.c:1483 [inline] exc_page_fault+0x6a/0xc0 arch/x86/mm/fault.c:1536 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595 page last free pid 6434 tgid 6434 ts 186725125789 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] free_unref_folios+0xd0f/0x1950 mm/page_alloc.c:3022 folios_put_refs+0x815/0x920 mm/folio.c:1034 free_pages_and_swap_cache+0x2ba/0x490 mm/swap_state.c:592 __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:417 [inline] tlb_flush_mmu+0x6d3/0xa30 mm/mmu_gather.c:424 tlb_finish_mmu+0xf4/0x220 mm/mmu_gather.c:549 exit_mmap+0x4b2/0x9f0 mm/mmap.c:1328 __mmput+0xcb/0x3d0 kernel/fork.c:1193 exit_mm+0x186/0x240 kernel/exit.c:617 do_exit+0x6cd/0x2360 kernel/exit.c:999 do_group_exit+0x22d/0x2f0 kernel/exit.c:1154 __do_sys_exit_group kernel/exit.c:1165 [inline] __se_sys_exit_group kernel/exit.c:1163 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1163 x64_sys_call+0x18c6/0x18d0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff8880528ddb00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880528ddb80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8880528ddc00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880528ddc80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880528ddd00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================