EXT4-fs error (device loop2): ext4_orphan_get:1395: comm syz.2.18: couldn't read orphan inode 15 (err -117) EXT4-fs (loop2): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none. ================================================================== BUG: KASAN: slab-out-of-bounds in ext4_insert_dentry+0x3cd/0x780 fs/ext4/namei.c:2094 Write of size 247 at addr ffff888031755f24 by task syz.2.18/6091 CPU: 0 UID: 0 PID: 6091 Comm: syz.2.18 Not tainted 6.14.0-syzkaller-13524-gf4d2ef48250a #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0x16e/0x5b0 mm/kasan/report.c:521 kasan_report+0x143/0x180 mm/kasan/report.c:634 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x28f/0x2a0 mm/kasan/generic.c:189 __asan_memcpy+0x40/0x70 mm/kasan/shadow.c:106 ext4_insert_dentry+0x3cd/0x780 fs/ext4/namei.c:2094 add_dirent_to_buf+0x311/0x660 fs/ext4/namei.c:2139 make_indexed_dir+0xcdb/0x1300 fs/ext4/namei.c:2336 ext4_add_entry+0xb3a/0xd30 fs/ext4/namei.c:2437 ext4_add_nondir+0x8d/0x290 fs/ext4/namei.c:2786 ext4_create+0x376/0x550 fs/ext4/namei.c:2832 vfs_create+0x23c/0x3d0 fs/namei.c:3363 do_mknodat+0x407/0x600 fs/namei.c:4243 __do_sys_mknod fs/namei.c:4276 [inline] __se_sys_mknod fs/namei.c:4274 [inline] __x64_sys_mknod+0x8c/0xa0 fs/namei.c:4274 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f56e518d169 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:00007f56e5ffb038 EFLAGS: 00000246 ORIG_RAX: 0000000000000085 RAX: ffffffffffffffda RBX: 00007f56e53a5fa0 RCX: 00007f56e518d169 RDX: 0000000000000704 RSI: 0000000000000000 RDI: 0000200000000000 RBP: 00007f56e520e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f56e53a5fa0 R15: 00007ffe3b2e8ae8 The buggy address belongs to the physical page: page: refcount:3 mapcount:0 mapping:ffff8880239f6478 index:0x3f pfn:0x31755 memcg:ffff88807cf1c000 aops:def_blk_aops ino:700002 dentry name(?):"" flags: 0xfff00000004114(referenced|dirty|active|private|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000004114 0000000000000000 dead000000000122 ffff8880239f6478 raw: 000000000000003f ffff8880633d4e80 00000003ffffffff ffff88807cf1c000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x148c40(GFP_NOFS|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL), pid 6091, tgid 6088 (syz.2.18), ts 108284202960, free_ts 108277173725 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1717 prep_new_page mm/page_alloc.c:1725 [inline] get_page_from_freelist+0x351d/0x36b0 mm/page_alloc.c:3652 __alloc_frozen_pages_noprof+0x211/0x5b0 mm/page_alloc.c:4934 alloc_pages_mpol+0x339/0x690 mm/mempolicy.c:2301 alloc_frozen_pages_noprof mm/mempolicy.c:2372 [inline] alloc_pages_noprof+0x121/0x190 mm/mempolicy.c:2392 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2402 filemap_alloc_folio_noprof+0xe4/0x550 mm/filemap.c:1007 __filemap_get_folio+0x423/0xb40 mm/filemap.c:1969 grow_dev_folio fs/buffer.c:1039 [inline] grow_buffers fs/buffer.c:1105 [inline] __getblk_slow fs/buffer.c:1131 [inline] bdev_getblk+0x1d4/0x670 fs/buffer.c:1431 getblk_unmovable include/linux/buffer_head.h:368 [inline] ext4_getblk+0x31d/0x890 fs/ext4/inode.c:867 ext4_bread+0x2e/0x180 fs/ext4/inode.c:915 ext4_append+0x32c/0x5d0 fs/ext4/namei.c:83 make_indexed_dir+0x426/0x1300 fs/ext4/namei.c:2257 ext4_add_entry+0xb3a/0xd30 fs/ext4/namei.c:2437 ext4_add_nondir+0x8d/0x290 fs/ext4/namei.c:2786 ext4_create+0x376/0x550 fs/ext4/namei.c:2832 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0xddf/0x10a0 mm/page_alloc.c:2680 pagetable_free include/linux/mm.h:3002 [inline] pagetable_dtor_free include/linux/mm.h:3100 [inline] __tlb_remove_table+0x36b/0x460 include/asm-generic/tlb.h:215 __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x79/0xf0 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2568 [inline] rcu_core+0xaac/0x17a0 kernel/rcu/tree.c:2824 handle_softirqs+0x2d6/0x9b0 kernel/softirq.c:579 run_ksoftirqd+0xcf/0x130 kernel/softirq.c:968 smpboot_thread_fn+0x576/0xaa0 kernel/smpboot.c:164 kthread+0x7b7/0x940 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888031755f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888031755f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888031756000: 00 00 fc fc 00 00 fc fc 00 00 fc fc 00 00 fc fc ^ ffff888031756080: 00 00 fc fc fa fb fc fc fa fb fc fc fa fb fc fc ffff888031756100: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc ==================================================================