loop0: detected capacity change from 0 to 128
VFS: Found a Xenix FS (block size = 1024) on device loop0
syz-executor319: attempt to access beyond end of device
loop0: rw=0, sector=6491536, nr_sectors = 2 limit=128
Buffer I/O error on dev loop0, logical block 3245768, async page read
==================================================================
BUG: KASAN: use-after-free in sysv_new_inode+0xfc7/0x1160 fs/sysv/ialloc.c:153
Read of size 2 at addr ffff888070ed81ce by task syz-executor319/5832

CPU: 0 UID: 0 PID: 5832 Comm: syz-executor319 Not tainted 6.12.0-rc5-syzkaller-00308-g3e5e6c9900c3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 <TASK>
 __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:377 [inline]
 print_report+0x169/0x550 mm/kasan/report.c:488
 kasan_report+0x143/0x180 mm/kasan/report.c:601
 sysv_new_inode+0xfc7/0x1160 fs/sysv/ialloc.c:153
 sysv_symlink+0x9f/0x180 fs/sysv/namei.c:80
 vfs_symlink+0x137/0x2e0 fs/namei.c:4615
 do_symlinkat+0x222/0x3a0 fs/namei.c:4641
 __do_sys_symlink fs/namei.c:4662 [inline]
 __se_sys_symlink fs/namei.c:4660 [inline]
 __x64_sys_symlink+0x7a/0x90 fs/namei.c:4660
 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:0x7f46cd5209b9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 1f 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffde8851a78 EFLAGS: 00000246 ORIG_RAX: 0000000000000058
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f46cd5209b9
RDX: 0000000000000000 RSI: 00000000200059c0 RDI: 00000000200049c0
RBP: 00007f46cd56e2a2 R08: 0000000000009e7f R09: 00007f46cd56e2c4
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f46cd56e227
R13: 0000000000050012 R14: 00007f46cd5ac750 R15: 00007ffde8851b70
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x70ed8
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea0001c3b648 ffffea0001c3b5c8 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Movable, gfp_mask 0x8(__GFP_MOVABLE), pid 1, tgid 1 (swapper/0), ts 13688989993, free_ts 14804820167
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1537
 split_free_pages mm/page_alloc.c:6478 [inline]
 alloc_contig_range_noprof+0x821/0xe00 mm/page_alloc.c:6605
 __alloc_contig_pages mm/page_alloc.c:6634 [inline]
 alloc_contig_pages_noprof+0x4b3/0x5c0 mm/page_alloc.c:6714
 debug_vm_pgtable_alloc_huge_page+0xaf/0x100 mm/debug_vm_pgtable.c:1084
 init_args+0x83b/0xb20 mm/debug_vm_pgtable.c:1266
 debug_vm_pgtable+0xe0/0x550 mm/debug_vm_pgtable.c:1304
 do_one_initcall+0x248/0x880 init/main.c:1269
 do_initcall_level+0x157/0x210 init/main.c:1331
 do_initcalls+0x3f/0x80 init/main.c:1347
 kernel_init_freeable+0x435/0x5d0 init/main.c:1580
 kernel_init+0x1d/0x2b0 init/main.c:1469
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
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:1108 [inline]
 free_unref_page+0xcd0/0xf00 mm/page_alloc.c:2638
 free_contig_range+0x152/0x550 mm/page_alloc.c:6748
 destroy_args+0x8a/0x840 mm/debug_vm_pgtable.c:1017
 debug_vm_pgtable+0x4be/0x550 mm/debug_vm_pgtable.c:1397
 do_one_initcall+0x248/0x880 init/main.c:1269
 do_initcall_level+0x157/0x210 init/main.c:1331
 do_initcalls+0x3f/0x80 init/main.c:1347
 kernel_init_freeable+0x435/0x5d0 init/main.c:1580
 kernel_init+0x1d/0x2b0 init/main.c:1469
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

Memory state around the buggy address:
 ffff888070ed8080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888070ed8100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888070ed8180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                              ^
 ffff888070ed8200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888070ed8280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================