Buffer I/O error on dev loop0, logical block 3245774, async page read attempt to access beyond end of device loop0: rw=0, want=17669880, limit=128 Buffer I/O error on dev loop0, logical block 8834939, async page read ================================================================== BUG: KASAN: use-after-free in sysv_new_inode+0xd21/0x1250 fs/sysv/ialloc.c:153 Read of size 2 at addr ffff88806d7aa1ce by task syz-executor.0/1933 CPU: 0 PID: 1933 Comm: syz-executor.0 Not tainted 5.15.165-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x41/0x5e lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:451 sysv_new_inode+0xd21/0x1250 fs/sysv/ialloc.c:153 sysv_mknod fs/sysv/namei.c:53 [inline] sysv_create+0x13/0x90 fs/sysv/namei.c:67 lookup_open.isra.0+0xe3b/0x1680 fs/namei.c:3462 open_last_lookups fs/namei.c:3532 [inline] path_openat+0x7e3/0x2360 fs/namei.c:3739 do_filp_open+0x199/0x3d0 fs/namei.c:3769 do_sys_openat2+0x11e/0x400 fs/open.c:1253 do_sys_open fs/open.c:1269 [inline] __do_sys_openat fs/open.c:1285 [inline] __se_sys_openat fs/open.c:1280 [inline] __x64_sys_openat+0x11b/0x1d0 fs/open.c:1280 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x33/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f25aa77dca9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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:00007f25aa2ff0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f25aa8abf80 RCX: 00007f25aa77dca9 RDX: 0000000000002c41 RSI: 0000000020000040 RDI: ffffffffffffff9c RBP: 00007f25aa7c947e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000006 R14: 00007f25aa8abf80 R15: 00007ffcbf2222f8 The buggy address belongs to the page: page:ffffea0001b5ea80 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x6d7aa flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001b5ec48 ffffea0001b5f008 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 0x1100dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), pid 1933, ts 67808269233, free_ts 67810166833 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x12d1/0x2d40 mm/page_alloc.c:4159 __alloc_pages+0x1b2/0x440 mm/page_alloc.c:5423 alloc_pages_vma+0xe0/0x650 mm/mempolicy.c:2146 do_anonymous_page mm/memory.c:3808 [inline] handle_pte_fault mm/memory.c:4619 [inline] __handle_mm_fault+0x1ce9/0x33c0 mm/memory.c:4756 handle_mm_fault+0x1c5/0x5b0 mm/memory.c:4854 do_user_addr_fault+0x298/0xc80 arch/x86/mm/fault.c:1357 handle_page_fault arch/x86/mm/fault.c:1445 [inline] exc_page_fault+0x5a/0xb0 arch/x86/mm/fault.c:1501 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:568 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+0x379/0x850 mm/page_alloc.c:1391 free_unref_page_prepare mm/page_alloc.c:3317 [inline] free_unref_page_list+0x16f/0xbd0 mm/page_alloc.c:3433 release_pages+0xb3a/0x1480 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+0x127/0x790 mm/mmu_gather.c:338 unmap_region+0x298/0x390 mm/mmap.c:2668 __do_munmap+0x481/0x10c0 mm/mmap.c:2899 __vm_munmap+0xd2/0x1a0 mm/mmap.c:2922 __do_sys_munmap mm/mmap.c:2948 [inline] __se_sys_munmap mm/mmap.c:2944 [inline] __x64_sys_munmap+0x5d/0x80 mm/mmap.c:2944 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x33/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff88806d7aa080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806d7aa100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88806d7aa180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88806d7aa200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806d7aa280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================