================================================================== BUG: KASAN: use-after-free in ext4_htree_fill_tree+0x131b/0x13e0 fs/ext4/namei.c:1246 Read of size 1 at addr ffff88810e92ed1b by task syz-executor/477 CPU: 1 PID: 477 Comm: syz-executor Not tainted 5.15.178-syzkaller-1079147-g7d1f9b5c2ff5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1c0 lib/dump_stack.c:106 print_address_description+0x87/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:444 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306 ext4_htree_fill_tree+0x131b/0x13e0 fs/ext4/namei.c:1246 ext4_dx_readdir fs/ext4/dir.c:606 [inline] ext4_readdir+0x2f75/0x3960 fs/ext4/dir.c:142 iterate_dir+0x265/0x600 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0x1c1/0x460 fs/readdir.c:354 __x64_sys_getdents64+0x7b/0x90 fs/readdir.c:354 x64_sys_call+0x5ae/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:218 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:0x7f37a09bf753 Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 52 3e f8 ff 66 90 b8 ff ff ff 7f 48 39 c2 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 c7 c2 a8 ff ff ff f7 d8 RSP: 002b:00007ffe1b217458 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 000055558f6f04e0 RCX: 00007f37a09bf753 RDX: 0000000000008000 RSI: 000055558f6f04e0 RDI: 0000000000000005 RBP: 000055558f6f04b4 R08: 0000000000028b61 R09: 0000000000000000 R10: 00007f37a0b7cca0 R11: 0000000000000293 R12: ffffffffffffffa8 R13: 0000000000000010 R14: 000055558f6f04b0 R15: 00007ffe1b219710 The buggy address belongs to the page: page:ffffea00043a4b80 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10e92e flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea00043a4bc8 ffffea0004367088 0000000000000000 raw: 0000000000000000 00000000000d0000 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 200, ts 11139367227, free_ts 56182764646 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1b/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x3550/0x35d0 mm/page_alloc.c:4485 __alloc_pages+0x27e/0x8f0 mm/page_alloc.c:5780 allocate_slab mm/slub.c:1932 [inline] new_slab+0x9a/0x4e0 mm/slub.c:1995 ___slab_alloc+0x39e/0x830 mm/slub.c:3028 __slab_alloc+0x4a/0x90 mm/slub.c:3115 slab_alloc_node mm/slub.c:3206 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0x139/0x250 mm/slub.c:3255 vm_area_dup+0x26/0x230 kernel/fork.c:368 dup_mmap kernel/fork.c:602 [inline] dup_mm kernel/fork.c:1522 [inline] copy_mm+0x9a1/0x13e0 kernel/fork.c:1574 copy_process+0x1149/0x3290 kernel/fork.c:2263 kernel_clone+0x21e/0x9e0 kernel/fork.c:2661 __do_sys_clone kernel/fork.c:2787 [inline] __se_sys_clone kernel/fork.c:2771 [inline] __x64_sys_clone+0x23f/0x290 kernel/fork.c:2771 x64_sys_call+0x1b0/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:57 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:26 [inline] free_pages_prepare mm/page_alloc.c:1472 [inline] free_pcp_prepare mm/page_alloc.c:1544 [inline] free_unref_page_prepare+0x7c8/0x7d0 mm/page_alloc.c:3534 free_unref_page+0xe8/0x750 mm/page_alloc.c:3616 free_the_page mm/page_alloc.c:805 [inline] __free_pages+0x61/0xf0 mm/page_alloc.c:5856 __free_slab+0xec/0x1d0 mm/slub.c:2020 free_slab mm/slub.c:2035 [inline] discard_slab+0x29/0x40 mm/slub.c:2041 __slab_free+0x205/0x290 mm/slub.c:3426 do_slab_free mm/slub.c:3509 [inline] ___cache_free+0x109/0x120 mm/slub.c:3530 qlink_free+0x4d/0x90 mm/kasan/quarantine.c:157 qlist_free_all+0x44/0xb0 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x15a/0x180 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:443 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:550 slab_alloc_node mm/slub.c:3240 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0xf5/0x250 mm/slub.c:3255 getname_flags+0xba/0x520 fs/namei.c:138 user_path_at_empty+0x2d/0x1a0 fs/namei.c:2882 user_path_at include/linux/namei.h:57 [inline] vfs_statx+0xfd/0x720 fs/stat.c:221 Memory state around the buggy address: ffff88810e92ec00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88810e92ec80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88810e92ed00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88810e92ed80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88810e92ee00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== EXT4-fs error (device loop6): __ext4_get_inode_loc:4351: comm syz-executor: Invalid inode table block 14875662660405297151 in block_group 0 EXT4-fs error (device loop6) in ext4_reserve_inode_write:5837: Corrupt filesystem EXT4-fs error (device loop6): ext4_dirty_inode:6041: inode #2: comm syz-executor: mark_inode_dirty error