loop2: detected capacity change from 0 to 128 VFS: Found a Xenix FS (block size = 1024) on device loop2 ================================================================== BUG: KASAN: use-after-free in sysv_new_inode+0x10d9/0x1270 fs/sysv/ialloc.c:153 Read of size 2 at addr ffff8880711801ce by task syz.2.426/5544 CPU: 1 PID: 5544 Comm: syz.2.426 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x210 mm/kasan/report.c:420 kasan_report+0x10b/0x140 mm/kasan/report.c:524 sysv_new_inode+0x10d9/0x1270 fs/sysv/ialloc.c:153 sysv_mknod+0x4a/0xd0 fs/sysv/namei.c:53 lookup_open fs/namei.c:3490 [inline] open_last_lookups fs/namei.c:3558 [inline] path_openat+0x1187/0x2e70 fs/namei.c:3788 do_filp_open+0x1c1/0x3c0 fs/namei.c:3818 do_sys_openat2+0x142/0x490 fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_openat fs/open.c:1352 [inline] __se_sys_openat fs/open.c:1347 [inline] __x64_sys_openat+0x135/0x160 fs/open.c:1347 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f9cb6f8f749 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:00007f9cb7e3f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f9cb71e5fa0 RCX: 00007f9cb6f8f749 RDX: 0000000000000042 RSI: 0000200000000040 RDI: ffffffffffffff9c RBP: 00007f9cb7013f91 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000001ff R11: 0000000000000246 R12: 0000000000000000 R13: 00007f9cb71e6038 R14: 00007f9cb71e5fa0 R15: 00007ffd0a4df7b8 The buggy address belongs to the physical page: page:ffffea0001c46000 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x1 pfn:0x71180 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001456008 ffffea0001430008 0000000000000000 raw: 0000000000000001 0000000000000007 00000000ffffff7f 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 0x152c4a(GFP_NOFS|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE), pid 4254, tgid 4254 (syz-executor), ts 73651455621, free_ts 96858099133 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328 __alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614 folio_alloc+0x1c/0x60 mm/mempolicy.c:2292 filemap_alloc_folio+0xdb/0x460 mm/filemap.c:999 page_cache_ra_unbounded+0x177/0x770 mm/readahead.c:248 filemap_readahead mm/filemap.c:2640 [inline] filemap_get_pages mm/filemap.c:2681 [inline] filemap_read+0x7d7/0x2f80 mm/filemap.c:2759 generic_file_read_iter+0x115/0x670 mm/filemap.c:2941 __kernel_read+0x2dc/0x6b0 fs/read_write.c:428 integrity_kernel_read+0x86/0xd0 security/integrity/iint.c:228 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:485 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:516 [inline] ima_calc_file_hash+0x96b/0x17c0 security/integrity/ima/ima_crypto.c:573 ima_collect_measurement+0x4b3/0xac0 security/integrity/ima/ima_api.c:293 process_measurement+0xfae/0x1a10 security/integrity/ima/ima_main.c:351 ima_file_check+0xc2/0x100 security/integrity/ima/ima_main.c:534 do_open fs/namei.c:3636 [inline] path_openat+0x2679/0x2e70 fs/namei.c:3791 do_filp_open+0x1c1/0x3c0 fs/namei.c:3818 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare mm/page_alloc.c:1509 [inline] free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384 free_unref_page_list+0xbb/0x8e0 mm/page_alloc.c:3525 release_pages+0x1f92/0x2200 mm/swap.c:1035 __pagevec_release+0x6d/0xe0 mm/swap.c:1055 pagevec_release include/linux/pagevec.h:71 [inline] folio_batch_release include/linux/pagevec.h:135 [inline] invalidate_mapping_pagevec+0x57b/0x660 mm/truncate.c:567 drop_pagecache_sb+0x19a/0x230 fs/drop_caches.c:39 iterate_supers+0x11e/0x1d0 fs/super.c:757 drop_caches_sysctl_handler+0x8e/0x160 fs/drop_caches.c:62 proc_sys_call_handler+0x458/0x6c0 fs/proc/proc_sysctl.c:602 do_iter_readv_writev fs/read_write.c:-1 [inline] do_iter_write+0x62d/0xaf0 fs/read_write.c:861 vfs_writev fs/read_write.c:934 [inline] do_writev+0x24e/0x410 fs/read_write.c:977 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 Memory state around the buggy address: ffff888071180080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888071180100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888071180180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888071180200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888071180280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================