================================================================== BUG: KASAN: use-after-free in __ext4_check_dir_entry+0x755/0x8e0 fs/ext4/dir.c:86 Read of size 2 at addr ffff8880351ef003 by task syz.0.22/6118 CPU: 1 UID: 0 PID: 6118 Comm: syz.0.22 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/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 __ext4_check_dir_entry+0x755/0x8e0 fs/ext4/dir.c:86 ext4_readdir+0x14b8/0x41a0 fs/ext4/dir.c:263 iterate_dir+0x399/0x570 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:0x7f8f17b9c629 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f8f189e9028 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f8f17e15fa0 RCX: 00007f8f17b9c629 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 00007f8f17c32b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f8f17e16038 R14: 00007f8f17e15fa0 R15: 00007fffbc8da038 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880351ef3c0 pfn:0x351ef flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0000a4da08 ffffea0000ab3e48 0000000000000000 raw: ffff8880351ef3c0 0000000000000000 00000000ffffffff 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 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5677, tgid 5677 (sed), ts 65926087006, free_ts 101567602162 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+0x24dc/0x2580 mm/page_alloc.c:3962 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5250 alloc_slab_page mm/slub.c:3255 [inline] allocate_slab+0x77/0x660 mm/slub.c:3444 new_slab mm/slub.c:3502 [inline] refill_objects+0x331/0x3c0 mm/slub.c:7134 refill_sheaf mm/slub.c:2804 [inline] __pcs_replace_empty_main+0x2b9/0x620 mm/slub.c:4578 alloc_from_pcs mm/slub.c:4681 [inline] slab_alloc_node mm/slub.c:4815 [inline] kmem_cache_alloc_noprof+0x37d/0x650 mm/slub.c:4837 vm_area_alloc+0x24/0x140 mm/vma_init.c:32 __mmap_new_vma mm/vma.c:2517 [inline] __mmap_region mm/vma.c:2759 [inline] mmap_region+0x10eb/0x2240 mm/vma.c:2837 do_mmap+0xc39/0x10c0 mm/mmap.c:559 vm_mmap_pgoff+0x2c9/0x4f0 mm/util.c:581 elf_map fs/binfmt_elf.c:399 [inline] elf_load+0x248/0x6a0 fs/binfmt_elf.c:422 load_elf_binary+0x1173/0x2980 fs/binfmt_elf.c:1188 search_binary_handler fs/exec.c:1664 [inline] exec_binprm fs/exec.c:1696 [inline] bprm_execve+0x93d/0x1460 fs/exec.c:1748 do_execveat_common+0x50d/0x690 fs/exec.c:1846 __do_sys_execve fs/exec.c:1930 [inline] __se_sys_execve fs/exec.c:1924 [inline] __x64_sys_execve+0x97/0xc0 fs/exec.c:1924 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0xc2b/0xdb0 mm/page_alloc.c:2978 rcu_do_batch kernel/rcu/tree.c:2617 [inline] rcu_core+0x7cd/0x1070 kernel/rcu/tree.c:2869 handle_softirqs+0x22a/0x870 kernel/softirq.c:626 run_ksoftirqd+0x36/0x60 kernel/softirq.c:1067 smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160 kthread+0x388/0x470 kernel/kthread.c:467 ret_from_fork+0x51e/0xb90 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: ffff8880351eef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880351eef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880351ef000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880351ef080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880351ef100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================