VFS: Found a Xenix FS (block size = 1024) on device loop5 ================================================================== BUG: KASAN: use-after-free in sysv_new_inode+0x10b4/0x1240 fs/sysv/ialloc.c:153 Read of size 2 at addr ffff8880551071ce by task syz.5.142/5087 CPU: 0 PID: 5087 Comm: syz.5.142 Not tainted 5.15.184-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 sysv_new_inode+0x10b4/0x1240 fs/sysv/ialloc.c:153 sysv_mknod+0x4a/0xd0 fs/sysv/namei.c:53 vfs_create+0x2db/0x460 fs/namei.c:3162 do_mknodat+0x39d/0x620 fs/namei.c:3994 __do_sys_mknodat fs/namei.c:4022 [inline] __se_sys_mknodat fs/namei.c:4019 [inline] __x64_sys_mknodat+0xa5/0xc0 fs/namei.c:4019 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:0x7f628e19e969 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:00007f628c006038 EFLAGS: 00000246 ORIG_RAX: 0000000000000103 RAX: ffffffffffffffda RBX: 00007f628e3c5fa0 RCX: 00007f628e19e969 RDX: 0000000000000408 RSI: 0000200000000040 RDI: ffffffffffffff9c RBP: 00007f628e220ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000103 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f628e3c5fa0 R15: 00007fff11647c18 The buggy address belongs to the page: page:ffffea00015441c0 refcount:2 mapcount:1 mapping:ffff888022c89c30 index:0x283 pfn:0x55107 memcg:ffff8880242bc000 aops:shmem_aops ino:438 dentry name:"dev/zero" flags: 0xfff00000080016(referenced|uptodate|lru|swapbacked|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000080016 ffffea0001544148 ffffea0001610048 ffff888022c89c30 raw: 0000000000000283 0000000000000000 0000000200000000 ffff8880242bc000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x1100cca(GFP_HIGHUSER_MOVABLE), pid 5061, ts 123638066793, free_ts 123527943763 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5466 alloc_pages_vma+0x393/0x7c0 mm/mempolicy.c:2146 shmem_alloc_page mm/shmem.c:1586 [inline] shmem_alloc_and_acct_page+0x427/0xb70 mm/shmem.c:1611 shmem_getpage_gfp+0x14f4/0x2d40 mm/shmem.c:1906 shmem_fault+0x1a9/0x520 mm/shmem.c:2118 __do_fault+0x141/0x330 mm/memory.c:3928 do_read_fault mm/memory.c:4264 [inline] do_fault mm/memory.c:4392 [inline] handle_pte_fault mm/memory.c:4650 [inline] __handle_mm_fault mm/memory.c:4785 [inline] handle_mm_fault+0x2949/0x43c0 mm/memory.c:4883 faultin_page mm/gup.c:976 [inline] __get_user_pages+0x93e/0x11c0 mm/gup.c:1197 populate_vma_page_range+0x213/0x290 mm/gup.c:1529 __mm_populate+0x26f/0x3a0 mm/gup.c:1638 mm_populate include/linux/mm.h:2632 [inline] vm_mmap_pgoff+0x203/0x2b0 mm/util.c:556 ksys_mmap_pgoff+0x140/0x780 mm/mmap.c:1623 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:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page_list+0x122/0x7e0 mm/page_alloc.c:3433 release_pages+0x184b/0x1bb0 mm/swap.c:963 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+0x164/0x2e0 mm/mmu_gather.c:338 exit_mmap+0x3a6/0x5f0 mm/mmap.c:3206 __mmput+0x115/0x3b0 kernel/fork.c:1127 exit_mm+0x567/0x6c0 kernel/exit.c:550 do_exit+0x599/0x20a0 kernel/exit.c:861 do_group_exit+0x12e/0x300 kernel/exit.c:996 __do_sys_exit_group kernel/exit.c:1007 [inline] __se_sys_exit_group kernel/exit.c:1005 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1005 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: ffff888055107080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888055107100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888055107180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff888055107200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888055107280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================