unable to read i-node block ================================================================== BUG: KASAN: out-of-bounds in sysv_new_block+0x790/0x970 fs/sysv/balloc.c:113 Read of size 4 at addr ffff888058b080c8 by task syz.3.4/5921 CPU: 1 UID: 0 PID: 5921 Comm: syz.3.4 Not tainted 6.14.0-rc7-syzkaller-00179-gb3ee1e460951 #0 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 sysv_new_block+0x790/0x970 fs/sysv/balloc.c:113 alloc_branch fs/sysv/itree.c:135 [inline] get_block+0x30a/0x16e0 fs/sysv/itree.c:254 __block_write_begin_int+0x692/0x19a0 fs/buffer.c:2116 sysv_make_empty+0xa8/0x640 fs/sysv/dir.c:262 sysv_mkdir+0x7f/0x130 fs/sysv/namei.c:130 vfs_mkdir+0x2f9/0x4f0 fs/namei.c:4313 do_mkdirat+0x264/0x3a0 fs/namei.c:4336 __do_sys_mkdir fs/namei.c:4356 [inline] __se_sys_mkdir fs/namei.c:4354 [inline] __x64_sys_mkdir+0x6c/0x80 fs/namei.c:4354 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbce7d8d169 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:00007fbce8c9d038 EFLAGS: 00000246 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00007fbce7fa5fa0 RCX: 00007fbce7d8d169 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000200000000300 RBP: 00007fbce7e0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fbce7fa5fa0 R15: 00007ffc7ef750e8 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:ffff88805a109dc0 index:0x440 pfn:0x58b08 memcg:ffff88805a0da000 aops:shmem_aops ino:400 dentry name(?):"memfd:syzkaller" flags: 0xfff0000002003c(referenced|uptodate|dirty|lru|swapbacked|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff0000002003c ffffea000162c1c8 ffffea000162c248 ffff88805a109dc0 raw: 0000000000000440 0000000000000000 00000001ffffffff ffff88805a0da000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 5919, tgid 5918 (syz.1.2), ts 86453420915, free_ts 27030897581 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0x3651/0x37a0 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4740 alloc_pages_mpol+0x311/0x660 mm/mempolicy.c:2270 folio_alloc_mpol_noprof+0x36/0x70 mm/mempolicy.c:2289 shmem_alloc_folio mm/shmem.c:1863 [inline] shmem_alloc_and_add_folio+0x4a0/0x1090 mm/shmem.c:1902 shmem_get_folio_gfp+0x621/0x1840 mm/shmem.c:2545 shmem_get_folio mm/shmem.c:2651 [inline] shmem_write_begin+0x165/0x350 mm/shmem.c:3301 generic_perform_write+0x327/0xa00 mm/filemap.c:4102 shmem_file_write_iter+0xf9/0x120 mm/shmem.c:3477 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xacf/0xd10 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0xe04/0x10e0 mm/page_alloc.c:2660 free_contig_range+0x14c/0x430 mm/page_alloc.c:6678 destroy_args+0x94/0x4b0 mm/debug_vm_pgtable.c:1017 debug_vm_pgtable+0x551/0x590 mm/debug_vm_pgtable.c:1397 do_one_initcall+0x248/0x930 init/main.c:1257 do_initcall_level+0x157/0x210 init/main.c:1319 do_initcalls+0x71/0xd0 init/main.c:1335 kernel_init_freeable+0x435/0x5d0 init/main.c:1568 kernel_init+0x1d/0x2b0 init/main.c:1457 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff888058b07f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888058b08000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888058b08080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888058b08100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888058b08180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================