================================================================== BUG: KASAN: use-after-free in ext4_htree_fill_tree+0x1066/0x10d0 fs/ext4/namei.c:1246 Read of size 1 at addr ffff888110359d1b by task syz-executor/447 CPU: 0 PID: 447 Comm: syz-executor Not tainted 6.1.141-syzkaller-1169946-g145c7fad733f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x71/0x210 mm/kasan/report.c:316 print_report+0x4a/0x60 mm/kasan/report.c:427 kasan_report+0x122/0x150 mm/kasan/report.c:531 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:348 ext4_htree_fill_tree+0x1066/0x10d0 fs/ext4/namei.c:1246 ext4_dx_readdir fs/ext4/dir.c:608 [inline] ext4_readdir+0x2d8a/0x3c10 fs/ext4/dir.c:145 iterate_dir+0x271/0x610 fs/readdir.c:-1 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0xe5/0x240 fs/readdir.c:354 __x64_sys_getdents64+0x7b/0x90 fs/readdir.c:354 x64_sys_call+0x15c/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:218 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f9840dbf693 Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 82 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:00007fff894f1388 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00005555564d14e0 RCX: 00007f9840dbf693 RDX: 0000000000008000 RSI: 00005555564d14e0 RDI: 0000000000000005 RBP: 00005555564d14b4 R08: 0000000000028b61 R09: 0000000000000000 R10: 00007f9840f7cca0 R11: 0000000000000293 R12: ffffffffffffffa8 R13: 0000000000000010 R14: 00005555564d14b0 R15: 0000000000000001 The buggy address belongs to the physical page: page:ffffea000440d640 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x110359 flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea000440d608 ffffea000440d688 0000000000000000 raw: 0000000000000000 0000000000000000 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 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 425, tgid 425 (syz-executor), ts 50869658782, free_ts 50957798309 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2637 prep_new_page+0x1c/0x110 mm/page_alloc.c:2644 get_page_from_freelist+0x2c7b/0x2cf0 mm/page_alloc.c:4539 __alloc_pages+0x19e/0x3a0 mm/page_alloc.c:5850 vm_area_alloc_pages mm/vmalloc.c:-1 [inline] __vmalloc_area_node mm/vmalloc.c:3074 [inline] __vmalloc_node_range+0x891/0x13d0 mm/vmalloc.c:3246 vmalloc_user+0x73/0x80 mm/vmalloc.c:3400 kcov_ioctl+0x57/0x640 kernel/kcov.c:713 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0x12f/0x1b0 fs/ioctl.c:856 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:856 x64_sys_call+0x58b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:17 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 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:26 [inline] free_pages_prepare mm/page_alloc.c:1545 [inline] free_pcp_prepare mm/page_alloc.c:1619 [inline] free_unref_page_prepare+0x742/0x750 mm/page_alloc.c:3581 free_unref_page+0x8f/0x530 mm/page_alloc.c:3677 free_the_page mm/page_alloc.c:830 [inline] __free_pages+0x67/0x100 mm/page_alloc.c:5939 __vunmap+0x9af/0xb70 mm/vmalloc.c:2729 __vfree mm/vmalloc.c:2778 [inline] vfree+0x61/0x90 mm/vmalloc.c:2809 kcov_put kernel/kcov.c:437 [inline] kcov_close+0x2b/0x50 kernel/kcov.c:533 __fput+0x1fc/0x8f0 fs/file_table.c:320 ____fput+0x15/0x20 fs/file_table.c:348 task_work_run+0x1db/0x240 kernel/task_work.c:203 exit_task_work include/linux/task_work.h:39 [inline] do_exit+0xa1d/0x2650 kernel/exit.c:877 do_group_exit+0x210/0x2d0 kernel/exit.c:1027 get_signal+0x13b5/0x1520 kernel/signal.c:2889 arch_do_signal_or_restart+0xb0/0x1030 arch/x86/kernel/signal.c:871 exit_to_user_mode_loop+0x7a/0xb0 kernel/entry/common.c:174 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:303 Memory state around the buggy address: ffff888110359c00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888110359c80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888110359d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888110359d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888110359e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== EXT4-fs error (device loop2): __ext4_get_inode_loc:4509: comm syz-executor: Invalid inode table block 14875662660405297151 in block_group 0 EXT4-fs error (device loop2) in ext4_reserve_inode_write:5916: Corrupt filesystem EXT4-fs error (device loop2): ext4_dirty_inode:6120: inode #2: comm syz-executor: mark_inode_dirty error EXT4-fs (loop2): unmounting filesystem.