================================================================== BUG: KASAN: slab-out-of-bounds in dx_move_dirents fs/ext4/namei.c:1863 [inline] BUG: KASAN: slab-out-of-bounds in do_split+0x120c/0x1d40 fs/ext4/namei.c:1993 Write of size 24923 at addr ffff88801df26c6e by task syz.2.164/5963 CPU: 0 UID: 0 PID: 5963 Comm: syz.2.164 Not tainted syzkaller #0 PREEMPT_{RT,(lazy)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026 Call Trace: dump_stack_lvl+0x11f/0x1c0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x220 mm/kasan/report.c:480 kasan_report+0x117/0x150 mm/kasan/report.c:593 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x264/0x2c0 mm/kasan/generic.c:189 __asan_memset+0x22/0x50 mm/kasan/shadow.c:84 dx_move_dirents fs/ext4/namei.c:1863 [inline] do_split+0x120c/0x1d40 fs/ext4/namei.c:1993 make_indexed_dir+0xbf8/0x10c0 fs/ext4/namei.c:2328 ext4_add_entry+0x1959/0x1b70 fs/ext4/namei.c:2435 ext4_rename fs/ext4/namei.c:3924 [inline] ext4_rename2+0x1700/0x26b0 fs/ext4/namei.c:4203 vfs_rename+0x919/0xcf0 fs/namei.c:5137 do_renameat2+0x69f/0xaa0 fs/namei.c:5286 __do_sys_rename fs/namei.c:5333 [inline] __se_sys_rename fs/namei.c:5331 [inline] __x64_sys_rename+0x7d/0x90 fs/namei.c:5331 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf0/0xfa0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f99429ee159 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f994282e028 EFLAGS: 00000246 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 00007f9942c76090 RCX: 00007f99429ee159 RDX: 0000000000000000 RSI: 0000200000000780 RDI: 0000200000000100 RBP: 00007f9942a8506b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f9942c76128 R14: 00007f9942c76090 R15: 00007ffcd1422e48 The buggy address belongs to the physical page: page: refcount:3 mapcount:0 mapping:ffff88801b452fb0 index:0x8 pfn:0x1df26 memcg:ffff888013eb1a80 aops:def_blk_aops ino:700002 dentry name(?):"" flags: 0x80000000004114(referenced|dirty|active|private|node=0|zone=1) raw: 0080000000004114 0000000000000000 dead000000000122 ffff88801b452fb0 raw: 0000000000000008 ffff88801f159250 00000003ffffffff ffff888013eb1a80 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x148c40(GFP_NOFS|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL), pid 5963, tgid 5950 (syz.2.164), ts 199340983070, free_ts 199193001391 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x234/0x280 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x20bd/0x2160 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:4959 alloc_pages_mpol+0xca/0x1e0 mm/mempolicy.c:2419 alloc_frozen_pages_noprof mm/mempolicy.c:2490 [inline] alloc_pages_noprof+0xf6/0x190 mm/mempolicy.c:2510 folio_alloc_noprof+0x14/0x90 mm/mempolicy.c:2520 filemap_alloc_folio_noprof+0xc5/0x400 mm/filemap.c:1007 __filemap_get_folio+0xe2/0x5c0 mm/filemap.c:1980 grow_dev_folio fs/buffer.c:1050 [inline] grow_buffers fs/buffer.c:1116 [inline] __getblk_slow fs/buffer.c:1140 [inline] bdev_getblk+0x151/0x4f0 fs/buffer.c:1467 getblk_unmovable include/linux/buffer_head.h:371 [inline] ext4_getblk+0x270/0x610 fs/ext4/inode.c:975 ext4_bread+0xf/0xf0 fs/ext4/inode.c:1023 ext4_append+0x229/0x450 fs/ext4/namei.c:83 make_indexed_dir+0x3c1/0x10c0 fs/ext4/namei.c:2255 ext4_add_entry+0x1959/0x1b70 fs/ext4/namei.c:2435 ext4_rename fs/ext4/namei.c:3924 [inline] ext4_rename2+0x1700/0x26b0 fs/ext4/namei.c:4203 vfs_rename+0x919/0xcf0 fs/namei.c:5137 page last free pid 21 tgid 21 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0xc2c/0xe40 mm/page_alloc.c:2706 pagetable_free include/linux/mm.h:2884 [inline] pagetable_dtor_free include/linux/mm.h:2982 [inline] __tlb_remove_table+0x22c/0x310 include/asm-generic/tlb.h:220 __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x6e/0xd0 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2576 [inline] rcu_core kernel/rcu/tree.c:2832 [inline] rcu_cpu_kthread+0xba9/0x1b50 kernel/rcu/tree.c:2920 smpboot_thread_fn+0x4ce/0x8d0 kernel/smpboot.c:164 kthread+0x63f/0x7b0 kernel/kthread.c:464 ret_from_fork+0x331/0x5d0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88801df28300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88801df28380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88801df28400: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc ^ ffff88801df28480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801df28500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================