================================================================== BUG: KASAN: slab-out-of-bounds in dx_insert_block fs/ext4/namei.c:1387 [inline] BUG: KASAN: slab-out-of-bounds in do_split+0x1a78/0x1f70 fs/ext4/namei.c:2080 Read of size 157024 at addr ffff88812b0c9028 by task syz.1.202/1449 CPU: 1 PID: 1449 Comm: syz.1.202 Not tainted 5.15.189-syzkaller-1081280-gf32b52534f1d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 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+0x280/0x290 mm/kasan/generic.c:189 memmove+0x2d/0x70 mm/kasan/shadow.c:54 dx_insert_block fs/ext4/namei.c:1387 [inline] do_split+0x1a78/0x1f70 fs/ext4/namei.c:2080 make_indexed_dir+0xe01/0x14a0 fs/ext4/namei.c:2392 ext4_add_entry+0xc24/0xf40 fs/ext4/namei.c:2504 __ext4_link+0x4d7/0x770 fs/ext4/namei.c:3536 ext4_link+0x1de/0x270 fs/ext4/namei.c:3577 vfs_link+0x636/0x7f0 fs/namei.c:4557 do_linkat+0x1e7/0x730 fs/namei.c:4628 __do_sys_link fs/namei.c:4662 [inline] __se_sys_link fs/namei.c:4660 [inline] __x64_sys_link+0x86/0x90 fs/namei.c:4660 x64_sys_call+0x34d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:87 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:0x7fa6fd2bf969 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:00007fa6fcd30038 EFLAGS: 00000246 ORIG_RAX: 0000000000000056 RAX: ffffffffffffffda RBX: 00007fa6fd4e6fa0 RCX: 00007fa6fd2bf969 RDX: 0000000000000000 RSI: 0000200000000bc0 RDI: 0000200000001240 RBP: 00007fa6fd341ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fa6fd4e6fa0 R15: 00007ffcdae22b08 The buggy address belongs to the page: page:ffffea0004ac3240 refcount:3 mapcount:1 mapping:ffff888109307a18 index:0x1 pfn:0x12b0c9 memcg:ffff888100255640 aops:def_blk_aops ino:700001 flags: 0x400000000032201e(referenced|uptodate|dirty|lru|private|mappedtodisk|unevictable|mlocked|zone=1) raw: 400000000032201e ffff88810025bbc0 ffffea0004baeac8 ffff888109307a18 raw: 0000000000000001 ffff88811155d1f8 0000000300000000 ffff888100255640 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 540, ts 117377654558, free_ts 117368555694 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+0x2cc5/0x2d50 mm/page_alloc.c:4485 __alloc_pages+0x18f/0x440 mm/page_alloc.c:5795 __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+0x2b2/0x980 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+0x2ae/0x420 mm/readahead.c:590 page_cache_sync_readahead include/linux/pagemap.h:831 [inline] filemap_get_pages mm/filemap.c:2568 [inline] filemap_read+0x63a/0x1f70 mm/filemap.c:2653 generic_file_read_iter+0xac/0x400 mm/filemap.c:2813 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+0x68b/0xbe0 fs/read_write.c:485 ksys_read+0x140/0x240 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+0x134/0x9d0 mm/page_alloc.c:3671 release_pages+0xfda/0x1030 mm/swap.c:1014 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+0x175/0x300 mm/mmu_gather.c:338 unmap_region+0x315/0x360 mm/mmap.c:2688 __do_munmap+0xa0e/0xfe0 mm/mmap.c:2921 __vm_munmap+0x15b/0x2a0 mm/mmap.c:2974 __do_sys_munmap mm/mmap.c:3000 [inline] __se_sys_munmap mm/mmap.c:2996 [inline] __x64_sys_munmap+0x6b/0x80 mm/mmap.c:2996 x64_sys_call+0xc9/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:12 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: ffff88812b0c9f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88812b0ca000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88812b0ca080: 00 fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 ^ ffff88812b0ca100: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ffff88812b0ca180: fc fc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== EXT4-fs error (device loop1): ext4_dx_csum_set:531: inode #2: comm syz.1.202: dir seems corrupt? Run e2fsck -D.