================================================================== 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 ffff88802e6a8c2a by task syz.9.3959/13449 CPU: 0 PID: 13449 Comm: syz.9.3959 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/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:0x7fe522184819 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:00007fe520bdf028 EFLAGS: 00000246 ORIG_RAX: 0000000000000085 RAX: ffffffffffffffda RBX: 00007fe5223fdfa0 RCX: 00007fe522184819 RDX: 0000000000000247 RSI: 0000000000000010 RDI: 0000200000000340 RBP: 00007fe52221ac91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fe5223fe038 R14: 00007fe5223fdfa0 R15: 00007ffc506c2ce8 The buggy address belongs to the page: page:ffffea0000b9aa00 refcount:2 mapcount:0 mapping:ffff88810930e2d8 index:0x8 pfn:0x2e6a8 memcg:ffff888100252280 aops:def_blk_aops ino:700009 flags: 0x2203e(referenced|uptodate|dirty|lru|active|private|mappedtodisk|zone=0) raw: 000000000002203e ffffea0004580e48 ffffea0000b9aa48 ffff88810930e2d8 raw: 0000000000000008 ffff888140f157e0 00000002ffffffff ffff888100252280 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 12023, ts 451953015919, free_ts 451903351164 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 __pagevec_release+0x71/0xe0 mm/swap.c:1035 pagevec_release include/linux/pagevec.h:81 [inline] truncate_inode_pages_range+0x34c/0xe00 mm/truncate.c:332 truncate_inode_pages+0x24/0x30 mm/truncate.c:428 kill_bdev block/bdev.c:77 [inline] blkdev_flush_mapping+0x188/0x360 block/bdev.c:659 blkdev_put_whole block/bdev.c:690 [inline] blkdev_put+0x47d/0x770 block/bdev.c:957 blkdev_close+0x77/0xa0 block/fops.c:478 __fput+0x20b/0x8b0 fs/file_table.c:311 ____fput+0x15/0x20 fs/file_table.c:339 task_work_run+0x127/0x190 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0xd0/0xe0 kernel/entry/common.c:181 exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 Memory state around the buggy address: ffff88802e6aaf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802e6aaf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802e6ab000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88802e6ab080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802e6ab100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================