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 ffff888071bbd003 by task syz-executor.3/3622 CPU: 0 PID: 3622 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:0x7f442d1e6f69 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:00007f442bd600c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f442d31df80 RCX: 00007f442d1e6f69 RDX: 0000000000000010 RSI: 0000000000000000 RDI: 0000000000000008 RBP: 00007f442d2446fe R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f442d31df80 R15: 00007fff78ad60e8 Allocated by task 3395: 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 The buggy address belongs to the object at ffff888071bbd000 which belongs to the cache vm_area_struct of size 200 The buggy address is located 3 bytes inside of 200-byte region [ffff888071bbd000, ffff888071bbd0c8) The buggy address belongs to the page: page:ffffea0001c6ef40 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888071bbde70 pfn:0x71bbd flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea000065e048 ffffea00006635c8 ffff888011deba00 raw: ffff888071bbde70 00000000000f0001 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 3395, ts 50147741209, free_ts 49973040927 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] slab_alloc mm/slub.c:3228 [inline] kmem_cache_alloc+0x18e/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 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+0x95/0x2d0 mm/page_alloc.c:3396 pipe_buf_release include/linux/pipe_fs_i.h:219 [inline] pipe_read+0x6e4/0x12b0 fs/pipe.c:323 call_read_iter include/linux/fs.h:2166 [inline] new_sync_read fs/read_write.c:404 [inline] vfs_read+0xa9f/0xe10 fs/read_write.c:485 ksys_read+0x1a2/0x2c0 fs/read_write.c:623 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 Memory state around the buggy address: ffff888071bbcf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888071bbcf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888071bbd000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888071bbd080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc ffff888071bbd100: fc fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================