attempt to access beyond end of device loop5: rw=0, want=6491538, limit=128 Buffer I/O error on dev loop5, logical block 3245768, async page read ================================================================== BUG: KASAN: use-after-free in sysv_new_inode+0x10b4/0x1240 fs/sysv/ialloc.c:153 Read of size 2 at addr ffff888057f7a1ce by task syz.5.273/5554 CPU: 1 PID: 5554 Comm: syz.5.273 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/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_symlink+0x9b/0x150 fs/sysv/namei.c:80 vfs_symlink+0x247/0x3d0 fs/namei.c:4429 do_symlinkat+0x1be/0x6c0 fs/namei.c:4458 __do_sys_symlink fs/namei.c:4480 [inline] __se_sys_symlink fs/namei.c:4478 [inline] __x64_sys_symlink+0x7a/0x90 fs/namei.c:4478 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:0x7f3bf2220ec9 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:00007f3bf0488038 EFLAGS: 00000246 ORIG_RAX: 0000000000000058 RAX: ffffffffffffffda RBX: 00007f3bf2477fa0 RCX: 00007f3bf2220ec9 RDX: 0000000000000000 RSI: 00002000000059c0 RDI: 00002000000049c0 RBP: 00007f3bf22a3f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f3bf2478038 R14: 00007f3bf2477fa0 R15: 00007fffb493d2b8 The buggy address belongs to the page: page:ffffea00015fde80 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x57f7a flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001728288 ffffea00015fc888 0000000000000000 raw: 0000000000000001 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 0x1100cca(GFP_HIGHUSER_MOVABLE), pid 5548, ts 153992318650, free_ts 154052334157 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:5487 alloc_pages_vma+0x393/0x7c0 mm/mempolicy.c:2146 wp_page_copy+0x235/0x1fd0 mm/memory.c:3056 handle_pte_fault mm/memory.c:4668 [inline] __handle_mm_fault mm/memory.c:4785 [inline] handle_mm_fault+0x1eca/0x43c0 mm/memory.c:4883 do_user_addr_fault+0x489/0xc80 arch/x86/mm/fault.c:1357 handle_page_fault arch/x86/mm/fault.c:1445 [inline] exc_page_fault+0x60/0x100 arch/x86/mm/fault.c:1501 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606 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 __pagevec_lru_add+0x1451/0x17c0 mm/swap.c:1056 lru_add_drain_cpu+0x102/0x670 mm/swap.c:597 lru_add_drain+0x79/0x130 mm/swap.c:701 __pagevec_release+0x44/0xe0 mm/swap.c:980 pagevec_release include/linux/pagevec.h:81 [inline] truncate_inode_pages_range+0x2f3/0xef0 mm/truncate.c:329 nilfs_evict_inode+0xdd/0x4a0 fs/nilfs2/inode.c:941 evict+0x485/0x870 fs/inode.c:647 nilfs_put_super+0xd1/0x150 fs/nilfs2/super.c:507 generic_shutdown_super+0x130/0x300 fs/super.c:475 kill_block_super+0x7c/0xe0 fs/super.c:1427 deactivate_locked_super+0x93/0xf0 fs/super.c:335 cleanup_mnt+0x418/0x4d0 fs/namespace.c:1139 task_work_run+0x125/0x1a0 kernel/task_work.c:188 Memory state around the buggy address: ffff888057f7a080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888057f7a100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888057f7a180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888057f7a200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888057f7a280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================