EXT4-fs warning (device loop3): dx_probe:892: inode #2: comm syz-executor.3: dx entry: limit 0 != root limit 124 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 ffff888054770003 by task syz-executor.3/4461 CPU: 0 PID: 4461 Comm: syz-executor.3 Not tainted 5.15.160-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description+0x63/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0x16b/0x1c0 mm/kasan/report.c:451 __ext4_check_dir_entry+0x6f3/0x870 fs/ext4/dir.c:85 ext4_readdir+0x14a6/0x38e0 fs/ext4/dir.c:258 iterate_dir+0x224/0x570 __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:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fd219c9aee9 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:00007fd21820e0c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007fd219dd1fa0 RCX: 00007fd219c9aee9 RDX: 0000000000000010 RSI: 0000000000000000 RDI: 0000000000000008 RBP: 00007fd219ce747f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fd219dd1fa0 R15: 00007ffd46730b58 Allocated by task 4180: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] __kasan_slab_alloc+0x8e/0xc0 mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook+0x53/0x380 mm/slab.h:519 slab_alloc_node mm/slub.c:3220 [inline] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0xf3/0x280 mm/slub.c:3233 vm_area_dup kernel/fork.c:357 [inline] dup_mmap kernel/fork.c:556 [inline] dup_mm kernel/fork.c:1465 [inline] copy_mm+0x8d2/0x1370 kernel/fork.c:1517 copy_process+0x1816/0x3ef0 kernel/fork.c:2206 kernel_clone+0x210/0x960 kernel/fork.c:2604 __do_sys_clone kernel/fork.c:2721 [inline] __se_sys_clone kernel/fork.c:2705 [inline] __x64_sys_clone+0x23f/0x290 kernel/fork.c:2705 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 4449: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x80 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd8/0x120 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0xdd/0x160 mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kmem_cache_free+0x91/0x1f0 mm/slub.c:3515 remove_vma mm/mmap.c:188 [inline] exit_mmap+0x556/0x670 mm/mmap.c:3197 __mmput+0x112/0x3b0 kernel/fork.c:1126 exit_mm+0x688/0x7f0 kernel/exit.c:548 do_exit+0x626/0x2480 kernel/exit.c:859 do_group_exit+0x144/0x310 kernel/exit.c:994 get_signal+0xc66/0x14e0 kernel/signal.c:2889 arch_do_signal_or_restart+0xc3/0x1890 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0x97/0x130 kernel/entry/common.c:178 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff888054770000 which belongs to the cache vm_area_struct of size 200