================================================================== 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+0x1f31/0x24e0 fs/ext4/namei.c:2080 Read of size 157024 at addr ffff88812e3cb028 by task syz.6.55/504 CPU: 1 PID: 504 Comm: syz.6.55 Not tainted 5.15.178-syzkaller-00193-g058abb720bd1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1c0 lib/dump_stack.c:106 print_address_description+0x87/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:444 kasan_check_range+0x293/0x2a0 mm/kasan/generic.c:189 memmove+0x2d/0x70 mm/kasan/shadow.c:54 dx_insert_block fs/ext4/namei.c:1387 [inline] do_split+0x1f31/0x24e0 fs/ext4/namei.c:2080 make_indexed_dir+0xeb7/0x15a0 fs/ext4/namei.c:2392 ext4_add_entry+0xde2/0x12b0 fs/ext4/namei.c:2504 __ext4_link+0x4e9/0x790 fs/ext4/namei.c:3536 ext4_link+0x1f3/0x290 fs/ext4/namei.c:3577 vfs_link+0x645/0x7f0 fs/namei.c:4557 do_linkat+0x34d/0x9f0 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+0x282/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:87 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f67db618de9 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:00007f67db08b038 EFLAGS: 00000246 ORIG_RAX: 0000000000000056 RAX: ffffffffffffffda RBX: 00007f67db831fa0 RCX: 00007f67db618de9 RDX: 0000000000000000 RSI: 0000400000000bc0 RDI: 0000400000001240 RBP: 00007f67db69a2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f67db831fa0 R15: 00007ffd706424b8 The buggy address belongs to the page: page:ffffea0004b8f2c0 refcount:3 mapcount:1 mapping:ffff8881093085d8 index:0x1 pfn:0x12e3cb memcg:ffff88810024c000 aops:def_blk_aops ino:700006 flags: 0x400000000032201e(referenced|uptodate|dirty|lru|private|mappedtodisk|unevictable|mlocked|zone=1) raw: 400000000032201e ffff888100247040 ffffea0004b8e988 ffff8881093085d8 raw: 0000000000000001 ffff8881208c35e8 0000000300000000 ffff88810024c000 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 415, ts 40934923314, free_ts 29655662220 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1b/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x3550/0x35d0 mm/page_alloc.c:4485 __alloc_pages+0x27e/0x8f0 mm/page_alloc.c:5780 __alloc_pages_node include/linux/gfp.h:591 [inline] alloc_pages_node include/linux/gfp.h:605 [inline] alloc_pages include/linux/gfp.h:618 [inline] __page_cache_alloc include/linux/pagemap.h:305 [inline] page_cache_ra_unbounded+0x334/0xa50 mm/readahead.c:227 do_page_cache_ra mm/readahead.c:280 [inline] force_page_cache_ra+0x3c0/0x420 mm/readahead.c:312 page_cache_sync_ra+0x2d5/0x4d0 mm/readahead.c:590 page_cache_sync_readahead include/linux/pagemap.h:831 [inline] filemap_get_pages mm/filemap.c:2560 [inline] filemap_read+0x785/0x2490 mm/filemap.c:2644 generic_file_read_iter+0xae/0x420 mm/filemap.c:2804 blkdev_read_iter+0x135/0x190 block/fops.c:560 call_read_iter include/linux/fs.h:2200 [inline] new_sync_read fs/read_write.c:404 [inline] vfs_read+0xa81/0xd40 fs/read_write.c:485 ksys_read+0x199/0x2c0 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+0x28/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:1 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 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+0x7c8/0x7d0 mm/page_alloc.c:3534 free_unref_page+0xe8/0x750 mm/page_alloc.c:3616 free_the_page mm/page_alloc.c:805 [inline] __free_pages+0x61/0xf0 mm/page_alloc.c:5856 __vunmap+0x7c1/0x940 mm/vmalloc.c:2652 __vfree mm/vmalloc.c:2701 [inline] vfree+0x7f/0xb0 mm/vmalloc.c:2732 kcov_put kernel/kcov.c:417 [inline] kcov_close+0x2b/0x50 kernel/kcov.c:519 __fput+0x228/0x8c0 fs/file_table.c:280 ____fput+0x15/0x20 fs/file_table.c:308 task_work_run+0x129/0x190 kernel/task_work.c:188 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0xc48/0x2ca0 kernel/exit.c:880 do_group_exit+0x141/0x310 kernel/exit.c:1002 get_signal+0x7a3/0x1630 kernel/signal.c:2907 arch_do_signal_or_restart+0xbd/0x1680 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0xa0/0xe0 kernel/entry/common.c:178 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x26/0x160 kernel/entry/common.c:307 Memory state around the buggy address: ffff88812e3ecf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88812e3ed000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88812e3ed080: 00 fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 ^ ffff88812e3ed100: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc ffff88812e3ed180: fc fc 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.55: dir seems corrupt? Run e2fsck -D.