================================================================== BUG: KASAN: slab-out-of-bounds in dx_insert_block+0xd9/0x240 fs/ext4/namei.c:1387 Read of size 157024 at addr ffff88812f7fb028 by task syz.6.52/711 CPU: 0 PID: 711 Comm: syz.6.52 Not tainted 6.1.141-syzkaller #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/0x158 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 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x280/0x290 mm/kasan/generic.c:189 memmove+0x2d/0x70 mm/kasan/shadow.c:54 dx_insert_block+0xd9/0x240 fs/ext4/namei.c:1387 do_split+0x19f0/0x1d90 fs/ext4/namei.c:2080 make_indexed_dir+0xe06/0x14a0 fs/ext4/namei.c:2392 ext4_add_entry+0xb45/0xd70 fs/ext4/namei.c:2504 __ext4_link+0x4d7/0x770 fs/ext4/namei.c:3522 ext4_link+0x1de/0x270 fs/ext4/namei.c:3563 vfs_link+0x636/0x7f0 fs/namei.c:4599 do_linkat+0x1f8/0x490 fs/namei.c:4670 __do_sys_link fs/namei.c:4704 [inline] __se_sys_link fs/namei.c:4702 [inline] __x64_sys_link+0x86/0x90 fs/namei.c:4702 x64_sys_call+0x266/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:87 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:0x7f717078cde9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f71715cf038 EFLAGS: 00000246 ORIG_RAX: 0000000000000056 RAX: ffffffffffffffda RBX: 00007f71709a5fa0 RCX: 00007f717078cde9 RDX: 0000000000000000 RSI: 0000400000000bc0 RDI: 0000400000001240 RBP: 00007f717080e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f71709a5fa0 R15: 00007ffdae267b38 The buggy address belongs to the physical page: page:ffffea0004bdfec0 refcount:3 mapcount:1 mapping:ffff88810048ea50 index:0x1 pfn:0x12f7fb memcg:ffff8881001fc000 aops:def_blk_aops ino:700006 flags: 0x460000000032205e(referenced|uptodate|dirty|lru|workingset|private|mappedtodisk|unevictable|mlocked|zone=1) raw: 460000000032205e dead000000000100 dead000000000001 ffff88810048ea50 raw: 0000000000000001 ffff8881141fc888 0000000300000000 ffff8881001fc000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x152c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 619, tgid 619 (udevd), ts 62979062481, free_ts 62943495289 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1d0/0x1f0 mm/page_alloc.c:2532 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x2e63/0x2ef0 mm/page_alloc.c:4328 __alloc_pages+0x235/0x4b0 mm/page_alloc.c:5614 __folio_alloc+0x12/0x40 mm/page_alloc.c:5646 __folio_alloc_node include/linux/gfp.h:246 [inline] folio_alloc include/linux/gfp.h:275 [inline] filemap_alloc_folio include/linux/pagemap.h:507 [inline] page_cache_ra_unbounded+0x17a/0x4a0 mm/readahead.c:248 do_page_cache_ra mm/readahead.c:300 [inline] force_page_cache_ra mm/readahead.c:331 [inline] page_cache_sync_ra+0x3e3/0x490 mm/readahead.c:713 page_cache_sync_readahead include/linux/pagemap.h:1248 [inline] filemap_get_pages mm/filemap.c:2665 [inline] filemap_read+0x5e4/0x2160 mm/filemap.c:2759 blkdev_read_iter+0x41e/0x560 block/fops.c:614 call_read_iter include/linux/fs.h:2259 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x3ff/0x8a0 fs/read_write.c:470 ksys_read+0x140/0x240 fs/read_write.c:613 __do_sys_read fs/read_write.c:623 [inline] __se_sys_read fs/read_write.c:621 [inline] __x64_sys_read+0x7b/0x90 fs/read_write.c:621 x64_sys_call+0x2f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:1 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:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare mm/page_alloc.c:1532 [inline] free_unref_page_prepare+0x742/0x750 mm/page_alloc.c:3384 free_unref_page_list+0xba/0x7c0 mm/page_alloc.c:3525 release_pages+0xad1/0xb20 mm/swap.c:1035 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:314 tlb_batch_pages_flush mm/mmu_gather.c:59 [inline] tlb_flush_mmu_free mm/mmu_gather.c:254 [inline] tlb_flush_mmu mm/mmu_gather.c:261 [inline] tlb_finish_mmu+0x1aa/0x370 mm/mmu_gather.c:361 exit_mmap+0x31f/0x750 mm/mmap.c:3250 __mmput+0x93/0x320 kernel/fork.c:1200 mmput+0x47/0x60 kernel/fork.c:1222 exit_mm kernel/exit.c:565 [inline] do_exit+0x957/0x2410 kernel/exit.c:858 do_group_exit+0x210/0x2d0 kernel/exit.c:1021 __do_sys_exit_group kernel/exit.c:1032 [inline] __se_sys_exit_group kernel/exit.c:1030 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1030 x64_sys_call+0x7b4/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:232 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 Memory state around the buggy address: ffff88812f7fbf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88812f7fc000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88812f7fc080: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ^ ffff88812f7fc100: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88812f7fc180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== EXT4-fs error (device loop6): ext4_dx_csum_set:531: inode #2: comm syz.6.52: dir seems corrupt? Run e2fsck -D.