================================================================== BUG: KASAN: slab-out-of-bounds in ext4_htree_fill_tree+0x1316/0x13e0 fs/ext4/namei.c:1246 Read of size 1 at addr ffff88812c73bd1b by task syz-executor/372 CPU: 1 PID: 372 Comm: syz-executor Not tainted 6.1.121-syzkaller-00998-g11620ab958c2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0x158/0x4e0 mm/kasan/report.c:427 kasan_report+0x13c/0x170 mm/kasan/report.c:531 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:348 ext4_htree_fill_tree+0x1316/0x13e0 fs/ext4/namei.c:1246 ext4_dx_readdir fs/ext4/dir.c:605 [inline] ext4_readdir+0x2e6f/0x3860 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:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f75f71bf693 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:00007ffef695a608 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 0000555564b014e0 RCX: 00007f75f71bf693 RDX: 0000000000008000 RSI: 0000555564b014e0 RDI: 0000000000000005 RBP: 0000555564b014b4 R08: 0000000000028b61 R09: 0000000000000000 R10: 00007f75f737cca0 R11: 0000000000000293 R12: ffffffffffffffa8 R13: 0000000000000010 R14: 0000555564b014b0 R15: 0000000000000001 The buggy address belongs to the object at ffff88812c73ba80 which belongs to the cache files_cache of size 704 The buggy address is located 667 bytes inside of 704-byte region [ffff88812c73ba80, ffff88812c73bd40) The buggy address belongs to the physical page: page:ffffea0004b1ce00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12c738 head:ffffea0004b1ce00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0x4000000000010200(slab|head|zone=1) raw: 4000000000010200 0000000000000000 dead000000000122 ffff8881002a8300 raw: 0000000000000000 0000000080130013 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 294, tgid 294 (syz-executor), ts 25176476923, free_ts 0 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x213/0x220 mm/page_alloc.c:2605 prep_new_page+0x1b/0x110 mm/page_alloc.c:2612 get_page_from_freelist+0x2f41/0x2fc0 mm/page_alloc.c:4477 __alloc_pages+0x234/0x610 mm/page_alloc.c:5775 alloc_slab_page+0x6c/0xf0 allocate_slab mm/slub.c:1962 [inline] new_slab+0x90/0x3e0 mm/slub.c:2015 ___slab_alloc+0x6f9/0xb80 mm/slub.c:3203 __slab_alloc+0x5d/0xa0 mm/slub.c:3302 slab_alloc_node mm/slub.c:3387 [inline] slab_alloc mm/slub.c:3431 [inline] __kmem_cache_alloc_lru mm/slub.c:3438 [inline] kmem_cache_alloc+0x1be/0x320 mm/slub.c:3447 dup_fd+0x55/0x950 fs/file.c:306 copy_files+0x76/0xe0 kernel/fork.c:1737 copy_process+0x11e9/0x3530 kernel/fork.c:2357 kernel_clone+0x229/0x890 kernel/fork.c:2785 __do_sys_clone3 kernel/fork.c:3086 [inline] __se_sys_clone3 kernel/fork.c:3070 [inline] __x64_sys_clone3+0x35c/0x390 kernel/fork.c:3070 x64_sys_call+0x935/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:436 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 page_owner free stack trace missing Memory state around the buggy address: ffff88812c73bc00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88812c73bc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88812c73bd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88812c73bd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88812c73be00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== EXT4-fs error (device loop3): __ext4_get_inode_loc:4508: comm syz-executor: Invalid inode table block 14875662660405297151 in block_group 0 EXT4-fs error (device loop3) in ext4_reserve_inode_write:5887: Corrupt filesystem EXT4-fs error (device loop3): ext4_dirty_inode:6091: inode #2: comm syz-executor: mark_inode_dirty error EXT4-fs (loop3): unmounting filesystem. syz-executor (372) used greatest stack depth: 20264 bytes left