EXT4-fs (loop2): mounted filesystem without journal. Opts: barrier=0x0000000000000006,resuid=0x0000000000000000,barrier=0x0000000000000003,norecovery,block_validity,data_err=abort,,errors=continue. Quota mode: none. ================================================================== BUG: KASAN: use-after-free in dx_move_dirents fs/ext4/namei.c:1935 [inline] BUG: KASAN: use-after-free in do_split+0x132f/0x1fb0 fs/ext4/namei.c:2056 Write of size 24923 at addr ffff88812331dc2a by task syz.2.646/2660 CPU: 0 PID: 2660 Comm: syz.2.646 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0xf1/0x140 mm/kasan/report.c:444 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x249/0x2a0 mm/kasan/generic.c:189 memset+0x23/0x40 mm/kasan/shadow.c:44 dx_move_dirents fs/ext4/namei.c:1935 [inline] do_split+0x132f/0x1fb0 fs/ext4/namei.c:2056 ext4_dx_add_entry+0x54f/0x1620 fs/ext4/namei.c:2688 ext4_add_entry+0xa9c/0x1030 fs/ext4/namei.c:2468 ext4_add_nondir+0x97/0x270 fs/ext4/namei.c:2845 ext4_create+0x2e6/0x470 fs/ext4/namei.c:2891 vfs_create+0x342/0x520 fs/namei.c:3170 do_mknodat+0x334/0x7a0 fs/namei.c:4002 __do_sys_mknod fs/namei.c:4035 [inline] __se_sys_mknod fs/namei.c:4033 [inline] __x64_sys_mknod+0x8e/0xa0 fs/namei.c:4033 x64_sys_call+0x886/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:134 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f5ea0df1819 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:00007f5e9f84c028 EFLAGS: 00000246 ORIG_RAX: 0000000000000085 RAX: ffffffffffffffda RBX: 00007f5ea106afa0 RCX: 00007f5ea0df1819 RDX: 0000000000000247 RSI: 0000000000000010 RDI: 0000200000000340 RBP: 00007f5ea0e87c91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5ea106b038 R14: 00007f5ea106afa0 R15: 00007ffd6c70faf8 The buggy address belongs to the page: page:ffffea00048cc740 refcount:2 mapcount:0 mapping:ffff8881092c1558 index:0x8 pfn:0x12331d memcg:ffff888100254500 aops:def_blk_aops ino:700002 flags: 0x400000000002203e(referenced|uptodate|dirty|lru|active|private|mappedtodisk|zone=1) raw: 400000000002203e ffffea0004d7d888 ffffea00043c0208 ffff8881092c1558 raw: 0000000000000008 ffff8881291ace70 00000002ffffffff ffff888100254500 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 1951, ts 132064435330, free_ts 132014378301 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x2d3a/0x2dc0 mm/page_alloc.c:4485 __alloc_pages+0x1a2/0x460 mm/page_alloc.c:5822 __alloc_pages_node include/linux/gfp.h:595 [inline] alloc_pages_node include/linux/gfp.h:609 [inline] alloc_pages include/linux/gfp.h:622 [inline] __page_cache_alloc include/linux/pagemap.h:305 [inline] page_cache_ra_unbounded+0x2d5/0x9a0 mm/readahead.c:227 do_page_cache_ra mm/readahead.c:280 [inline] force_page_cache_ra+0x3fd/0x460 mm/readahead.c:312 page_cache_sync_ra+0x2b4/0x430 mm/readahead.c:590 page_cache_sync_readahead include/linux/pagemap.h:831 [inline] filemap_get_pages mm/filemap.c:2569 [inline] filemap_read+0x694/0x2040 mm/filemap.c:2654 generic_file_read_iter+0xac/0x400 mm/filemap.c:2814 blkdev_read_iter+0x12f/0x160 block/fops.c:563 call_read_iter include/linux/fs.h:2206 [inline] new_sync_read fs/read_write.c:404 [inline] vfs_read+0x6c9/0xc40 fs/read_write.c:485 ksys_read+0x149/0x250 fs/read_write.c:623 __do_sys_read fs/read_write.c:633 [inline] __se_sys_read fs/read_write.c:631 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:631 x64_sys_call+0x96d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:1 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 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+0x542/0x550 mm/page_alloc.c:3534 free_unref_page_list+0x13a/0x9d0 mm/page_alloc.c:3671 release_pages+0x1006/0x1060 mm/swap.c:1015 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:320 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu mm/mmu_gather.c:247 [inline] tlb_finish_mmu+0x17e/0x310 mm/mmu_gather.c:338 exit_mmap+0x43b/0x8b0 mm/mmap.c:3248 __mmput+0x93/0x320 kernel/fork.c:1180 mmput+0x50/0x150 kernel/fork.c:1203 exit_mm kernel/exit.c:554 [inline] do_exit+0x9f2/0x27e0 kernel/exit.c:876 do_group_exit+0x141/0x310 kernel/exit.c:1003 __do_sys_exit_group kernel/exit.c:1014 [inline] __se_sys_exit_group kernel/exit.c:1012 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1012 x64_sys_call+0x832/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff88812331df00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88812331df80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88812331e000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88812331e080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88812331e100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================