EXT4-fs error (device loop4): ext4_orphan_get:1397: comm syz.4.1951: couldn't read orphan inode 15 (err -117) EXT4-fs warning (device loop4): dx_probe:801: inode #2: comm syz.4.1951: Unrecognised inode hash code 4 EXT4-fs warning (device loop4): dx_probe:934: inode #2: comm syz.4.1951: Corrupt directory, running e2fsck is recommended ================================================================== BUG: KASAN: use-after-free in __ext4_check_dir_entry+0x708/0x8a0 fs/ext4/dir.c:85 Read of size 2 at addr ffff888039bb4003 by task syz.4.1951/11808 CPU: 0 UID: 0 PID: 11808 Comm: syz.4.1951 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 __ext4_check_dir_entry+0x708/0x8a0 fs/ext4/dir.c:85 ext4_readdir+0x12a2/0x3b70 fs/ext4/dir.c:262 iterate_dir+0x3a5/0x580 fs/readdir.c:108 __do_sys_getdents64 fs/readdir.c:410 [inline] __se_sys_getdents64+0xe4/0x260 fs/readdir.c:396 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f5964f3eec9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f59645a6038 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f5965195fa0 RCX: 00007f5964f3eec9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 00007f5964fc1f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5965196038 R14: 00007f5965195fa0 R15: 00007ffeda2b0de8 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888039bb4140 pfn:0x39bb4 flags: 0x80000000000000(node=0|zone=1) page_type: f0(buddy) raw: 0080000000000000 ffffea0000da2208 ffffea0000e77808 0000000000000000 raw: ffff888039bb4140 0000000000000002 00000000f0000000 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 6284, tgid 6284 (sed), ts 149777910753, free_ts 172878137858 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1850 prep_new_page mm/page_alloc.c:1858 [inline] get_page_from_freelist+0x28c0/0x2960 mm/page_alloc.c:3884 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5183 alloc_pages_mpol+0xd1/0x380 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:3039 [inline] allocate_slab+0x96/0x3a0 mm/slub.c:3212 new_slab mm/slub.c:3266 [inline] ___slab_alloc+0xb12/0x13f0 mm/slub.c:4636 __kmem_cache_alloc_bulk+0x1c0/0x5a0 mm/slub.c:7375 refill_sheaf mm/slub.c:2617 [inline] __pcs_replace_empty_main+0x301/0x530 mm/slub.c:5025 alloc_from_pcs mm/slub.c:5123 [inline] slab_alloc_node mm/slub.c:5250 [inline] kmem_cache_alloc_noprof+0x45e/0x6b0 mm/slub.c:5272 vm_area_alloc+0x24/0x140 mm/vma_init.c:32 __mmap_new_vma mm/vma.c:2461 [inline] __mmap_region mm/vma.c:2670 [inline] mmap_region+0xdd8/0x20f0 mm/vma.c:2740 do_mmap+0xc23/0x10c0 mm/mmap.c:558 vm_mmap_pgoff+0x2a9/0x4d0 mm/util.c:581 ksys_mmap_pgoff+0x4e9/0x720 mm/mmap.c:604 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 20 tgid 20 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1394 [inline] __free_frozen_pages+0xfb6/0x1140 mm/page_alloc.c:2906 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core kernel/rcu/tree.c:2861 [inline] rcu_cpu_kthread+0xbf6/0x1b50 kernel/rcu/tree.c:2949 smpboot_thread_fn+0x542/0xa60 kernel/smpboot.c:160 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888039bb3f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888039bb3f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888039bb4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888039bb4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888039bb4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================