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 ffff88801e0a9003 by task syz-executor.3/3605 CPU: 1 PID: 3605 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:0x7fd864e3aee9 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:00007fd8633ae0c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007fd864f71fa0 RCX: 00007fd864e3aee9 RDX: 0000000000000010 RSI: 0000000000000000 RDI: 0000000000000008 RBP: 00007fd864e8747f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fd864f71fa0 R15: 00007ffc3bb45b98 Allocated by task 9: 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] kmem_cache_alloc_node+0x121/0x2c0 mm/slub.c:3256 alloc_vmap_area+0x1ba/0x19a0 mm/vmalloc.c:1531 __get_vm_area_node+0x16e/0x2f0 mm/vmalloc.c:2423 __vmalloc_node_range+0xe3/0x8c0 mm/vmalloc.c:3019 alloc_thread_stack_node kernel/fork.c:245 [inline] dup_task_struct+0x428/0xb60 kernel/fork.c:898 copy_process+0x5eb/0x3ef0 kernel/fork.c:2038 kernel_clone+0x210/0x960 kernel/fork.c:2604 kernel_thread+0x168/0x1e0 kernel/fork.c:2656 call_usermodehelper_exec_work+0x58/0x220 kernel/umh.c:174 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457 kthread+0x3f6/0x4f0 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300 The buggy address belongs to the object at ffff88801e0a9000 which belongs to the cache vmap_area of size 64 The buggy address is located 3 bytes inside of 64-byte region [ffff88801e0a9000, ffff88801e0a9040) The buggy address belongs to the page: page:ffffea0000782a40 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88801e0a9f00 pfn:0x1e0a9 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00007829c8 ffffea00007e5788 ffff888011c4fa00 raw: ffff88801e0a9f00 00000000002a0006 00000001ffffffff 0000000000000000 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 9, ts 7856638520, free_ts 7843986077 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159 __alloc_pages+0x272/0x700 mm/page_alloc.c:5423 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xbb/0x4b0 mm/slub.c:1975 ___slab_alloc+0x6f6/0xe10 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] kmem_cache_alloc_node+0x1ba/0x2c0 mm/slub.c:3256 alloc_vmap_area+0x1ba/0x19a0 mm/vmalloc.c:1531 __get_vm_area_node+0x16e/0x2f0 mm/vmalloc.c:2423 __vmalloc_node_range+0xe3/0x8c0 mm/vmalloc.c:3019 alloc_thread_stack_node kernel/fork.c:245 [inline] dup_task_struct+0x428/0xb60 kernel/fork.c:898 copy_process+0x5eb/0x3ef0 kernel/fork.c:2038 kernel_clone+0x210/0x960 kernel/fork.c:2604 kernel_thread+0x168/0x1e0 kernel/fork.c:2656 call_usermodehelper_exec_work+0x58/0x220 kernel/umh.c:174 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457 kthread+0x3f6/0x4f0 kernel/kthread.c:334 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0xc34/0xcf0 mm/page_alloc.c:3317 free_unref_page_list+0x1f7/0x8e0 mm/page_alloc.c:3433 release_pages+0x1bb9/0x1f40 mm/swap.c:963 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu mm/mmu_gather.c:247 [inline] tlb_finish_mmu+0x177/0x320 mm/mmu_gather.c:338 exit_mmap+0x3cd/0x670 mm/mmap.c:3188 __mmput+0x112/0x3b0 kernel/fork.c:1126 free_bprm+0x135/0x2f0 fs/exec.c:1496 kernel_execve+0x3bd/0x9b0 fs/exec.c:2011 call_usermodehelper_exec_async+0x22f/0x370 kernel/umh.c:112 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300 Memory state around the buggy address: ffff88801e0a8f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801e0a8f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88801e0a9000: fb fb fb fb fb fb fb fb fc fc fc fc fb fb fb fb ^ ffff88801e0a9080: fb fb fb fb fc fc fc fc fb fb fb fb fb fb fb fb ffff88801e0a9100: fc fc fc fc fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================