================================================================== BUG: KASAN: use-after-free in sysv_new_inode+0x10b7/0x1260 fs/sysv/ialloc.c:153 Read of size 2 at addr ffff8880559631ce by task syz.2.31/6029 CPU: 0 PID: 6029 Comm: syz.2.31 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 Call Trace: dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xa8/0x210 mm/kasan/report.c:468 kasan_report+0x117/0x150 mm/kasan/report.c:581 sysv_new_inode+0x10b7/0x1260 fs/sysv/ialloc.c:153 sysv_mknod+0x4e/0xe0 fs/sysv/namei.c:53 lookup_open fs/namei.c:3496 [inline] open_last_lookups fs/namei.c:3564 [inline] path_openat+0x1705/0x3270 fs/namei.c:3794 do_filp_open+0x1f2/0x430 fs/namei.c:3824 do_sys_openat2+0x134/0x1d0 fs/open.c:1421 do_sys_open fs/open.c:1436 [inline] __do_sys_openat fs/open.c:1452 [inline] __se_sys_openat fs/open.c:1447 [inline] __x64_sys_openat+0x139/0x160 fs/open.c:1447 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fad1399ce59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fad148db028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fad13c15fa0 RCX: 00007fad1399ce59 RDX: 00000000001250c0 RSI: 0000200000000180 RDI: ffffffffffffff9c RBP: 00007fad13a32e6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000199 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fad13c16038 R14: 00007fad13c15fa0 R15: 00007fffcc693758 The buggy address belongs to the physical page: page:ffffea00015658c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x55963 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 dead000000000100 dead000000000122 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 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 5974, tgid 5974 (syz.2.27), ts 104341076506, free_ts 106226931403 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1582 prep_new_page mm/page_alloc.c:1589 [inline] get_page_from_freelist+0x2181/0x22a0 mm/page_alloc.c:3221 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4501 __folio_alloc+0x10/0x20 mm/page_alloc.c:4533 vma_alloc_folio+0x474/0x8f0 mm/mempolicy.c:2240 shmem_alloc_folio+0x1a9/0x2a0 mm/shmem.c:1679 shmem_alloc_and_acct_folio+0x1cb/0x6c0 mm/shmem.c:1704 shmem_get_folio_gfp+0xe1d/0x2b40 mm/shmem.c:2041 shmem_get_folio mm/shmem.c:2164 [inline] shmem_write_begin+0xf2/0x430 mm/shmem.c:2706 generic_perform_write+0x2fe/0x5c0 mm/filemap.c:4036 shmem_file_write_iter+0xfb/0x120 mm/shmem.c:2883 __kernel_write_iter+0x29f/0x6d0 fs/read_write.c:517 dump_emit_page fs/coredump.c:957 [inline] dump_user_range+0x418/0x840 fs/coredump.c:984 elf_core_dump+0x320e/0x37c0 fs/binfmt_elf.c:2184 do_coredump+0x1791/0x24a0 fs/coredump.c:833 get_signal+0x10da/0x1390 kernel/signal.c:2889 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1182 [inline] free_unref_page_prepare+0x7d7/0x8f0 mm/page_alloc.c:2366 free_unref_page_list+0xbe/0x860 mm/page_alloc.c:2505 release_pages+0x208a/0x2300 mm/swap.c:1022 __folio_batch_release+0x71/0xe0 mm/swap.c:1042 folio_batch_release include/linux/pagevec.h:83 [inline] shmem_undo_range+0x5ff/0x1a80 mm/shmem.c:1026 shmem_truncate_range mm/shmem.c:1135 [inline] shmem_evict_inode+0x285/0xa70 mm/shmem.c:1264 evict+0x4b7/0x8a0 fs/inode.c:705 do_unlinkat+0x38c/0x590 fs/namei.c:4406 __do_sys_unlink fs/namei.c:4447 [inline] __se_sys_unlink fs/namei.c:4445 [inline] __x64_sys_unlink+0x49/0x50 fs/namei.c:4445 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff888055963080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888055963100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888055963180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888055963200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888055963280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================