EXT4-fs warning (device loop3): dx_probe:965: inode #2: comm syz-executor.3: Corrupt directory, running e2fsck is recommended
==================================================================
BUG: KASAN: use-after-free in __ext4_check_dir_entry+0x6f3/0x870 fs/ext4/dir.c:85
Read of size 2 at addr ffff88807ddc3003 by task syz-executor.3/4421

CPU: 1 PID: 4421 Comm: syz-executor.3 Not tainted 6.1.92-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:284 [inline]
 print_report+0x15f/0x4f0 mm/kasan/report.c:395
 kasan_report+0x136/0x160 mm/kasan/report.c:495
 __ext4_check_dir_entry+0x6f3/0x870 fs/ext4/dir.c:85
 ext4_readdir+0x139e/0x3950 fs/ext4/dir.c:258
 iterate_dir+0x224/0x560
 __do_sys_getdents64 fs/readdir.c:369 [inline]
 __se_sys_getdents64+0x209/0x4f0 fs/readdir.c:354
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fd1fa47cf69
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fd1fb1630c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 00007fd1fa5b3f80 RCX: 00007fd1fa47cf69
RDX: 0000000000000010 RSI: 0000000000000000 RDI: 0000000000000008
RBP: 00007fd1fa4da6fe R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fd1fa5b3f80 R15: 00007ffdb41ca3d8
 </TASK>

Allocated by task 4418:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
 __kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:328
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x52/0x3a0 mm/slab.h:737
 slab_alloc_node mm/slub.c:3398 [inline]
 slab_alloc mm/slub.c:3406 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3413 [inline]
 kmem_cache_alloc+0x10c/0x2d0 mm/slub.c:3422
 vm_area_alloc+0x20/0xe0 kernel/fork.c:458
 mmap_region+0xcbb/0x1fa0 mm/mmap.c:2743
 do_mmap+0x8c5/0xf60 mm/mmap.c:1425
 vm_mmap_pgoff+0x1ca/0x2d0 mm/util.c:520
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Freed by task 4418:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516
 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236
 kasan_slab_free include/linux/kasan.h:177 [inline]
 slab_free_hook mm/slub.c:1724 [inline]
 slab_free_freelist_hook mm/slub.c:1750 [inline]
 slab_free mm/slub.c:3661 [inline]
 kmem_cache_free+0x292/0x510 mm/slub.c:3683
 remove_vma mm/mmap.c:144 [inline]
 exit_mmap+0x538/0x9f0 mm/mmap.c:3249
 __mmput+0x115/0x3c0 kernel/fork.c:1199
 exit_mm+0x226/0x300 kernel/exit.c:563
 do_exit+0x9f6/0x26a0 kernel/exit.c:856
 do_group_exit+0x202/0x2b0 kernel/exit.c:1019
 __do_sys_exit_group kernel/exit.c:1030 [inline]
 __se_sys_exit_group kernel/exit.c:1028 [inline]
 __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1028
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

The buggy address belongs to the object at ffff88807ddc3000
 which belongs to the cache vm_area_struct of size 152
The buggy address is located 3 bytes inside of
 152-byte region [ffff88807ddc3000, ffff88807ddc3098)

The buggy address belongs to the physical page:
page:ffffea0001f770c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88807ddc3ca8 pfn:0x7ddc3
memcg:ffff888055b43801
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea00007d08c8 ffffea000156cf88 ffff888140008b40
raw: ffff88807ddc3ca8 0000000000120011 00000001ffffffff ffff888055b43801
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 2980, tgid 2980 (rcS), ts 18417029595, free_ts 16397188561
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2513
 prep_new_page mm/page_alloc.c:2520 [inline]
 get_page_from_freelist+0x31a1/0x3320 mm/page_alloc.c:4279
 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5547
 alloc_slab_page+0x6a/0x150 mm/slub.c:1794
 allocate_slab mm/slub.c:1939 [inline]
 new_slab+0x84/0x2d0 mm/slub.c:1992
 ___slab_alloc+0xc20/0x1270 mm/slub.c:3180
 __slab_alloc mm/slub.c:3279 [inline]
 slab_alloc_node mm/slub.c:3364 [inline]
 slab_alloc mm/slub.c:3406 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3413 [inline]
 kmem_cache_alloc+0x1a5/0x2d0 mm/slub.c:3422
 vm_area_dup+0x23/0x1b0 kernel/fork.c:466
 dup_mmap kernel/fork.c:645 [inline]
 dup_mm kernel/fork.c:1540 [inline]
 copy_mm+0xed2/0x19c0 kernel/fork.c:1589
 copy_process+0x19d5/0x4060 kernel/fork.c:2267
 kernel_clone+0x222/0x920 kernel/fork.c:2682
 __do_sys_clone kernel/fork.c:2823 [inline]
 __se_sys_clone kernel/fork.c:2807 [inline]
 __x64_sys_clone+0x231/0x280 kernel/fork.c:2807
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1440 [inline]
 free_pcp_prepare mm/page_alloc.c:1490 [inline]
 free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3358
 free_unref_page+0x33/0x3e0 mm/page_alloc.c:3453
 free_contig_range+0x9a/0x150 mm/page_alloc.c:9507
 destroy_args+0xfe/0x997 mm/debug_vm_pgtable.c:1031
 debug_vm_pgtable+0x416/0x46b mm/debug_vm_pgtable.c:1354
 do_one_initcall+0x265/0x8f0 init/main.c:1299
 do_initcall_level+0x157/0x207 init/main.c:1372
 do_initcalls+0x49/0x86 init/main.c:1388
 kernel_init_freeable+0x45c/0x60f init/main.c:1627
 kernel_init+0x19/0x290 init/main.c:1515
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308

Memory state around the buggy address:
 ffff88807ddc2f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88807ddc2f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88807ddc3000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff88807ddc3080: fb fb fb fc fc fc fc fc fc fc fc 00 00 00 00 00
 ffff88807ddc3100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc
==================================================================