================================================================== BUG: KASAN: use-after-free in __io_uring_show_fdinfo io_uring/fdinfo.c:98 [inline] BUG: KASAN: use-after-free in io_uring_show_fdinfo+0x559/0x15df io_uring/fdinfo.c:206 Read of size 8 at addr ffff88806f7fff20 by task syz-executor.0/4172 CPU: 1 PID: 4172 Comm: syz-executor.0 Not tainted 6.0.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495 __io_uring_show_fdinfo io_uring/fdinfo.c:98 [inline] io_uring_show_fdinfo+0x559/0x15df io_uring/fdinfo.c:206 seq_show+0x4aa/0x6d0 fs/proc/fd.c:68 seq_read_iter+0x3fa/0x1090 fs/seq_file.c:230 seq_read+0x161/0x200 fs/seq_file.c:162 vfs_read+0x1b8/0x7c0 fs/read_write.c:468 ksys_pread64 fs/read_write.c:659 [inline] __do_sys_pread64 fs/read_write.c:669 [inline] __se_sys_pread64 fs/read_write.c:666 [inline] __x64_sys_pread64+0x192/0x1e0 fs/read_write.c:666 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f87d628a5a9 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f87d7359168 EFLAGS: 00000246 ORIG_RAX: 0000000000000011 RAX: ffffffffffffffda RBX: 00007f87d63abf80 RCX: 00007f87d628a5a9 RDX: 0000000000000011 RSI: 0000000020002140 RDI: 0000000000000005 RBP: 00007f87d62e5580 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffce164f1f R14: 00007f87d7359300 R15: 0000000000022000 The buggy address belongs to the physical page: page:ffffea0001bdffc0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x6f7ff flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 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 9, migratetype Movable, gfp_mask 0x3d24ca(GFP_TRANSHUGE|__GFP_NORETRY|__GFP_THISNODE), pid 3600, tgid 3592 (syz-fuzzer), ts 34787143565, free_ts 36525392267 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5515 __folio_alloc+0x12/0x40 mm/page_alloc.c:5546 __folio_alloc_node include/linux/gfp.h:252 [inline] vma_alloc_folio+0x44c/0x5b0 mm/mempolicy.c:2212 do_huge_pmd_anonymous_page+0x1d9/0x1680 mm/huge_memory.c:834 create_huge_pmd mm/memory.c:4776 [inline] __handle_mm_fault+0x1a22/0x2b70 mm/memory.c:5023 handle_mm_fault+0x166/0x5e0 mm/memory.c:5151 do_user_addr_fault+0x2da/0xcf0 arch/x86/mm/fault.c:1397 handle_page_fault arch/x86/mm/fault.c:1488 [inline] exc_page_fault+0x5a/0xc0 arch/x86/mm/fault.c:1544 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x5e4/0xd20 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3476 __folio_put_large mm/swap.c:118 [inline] release_pages+0x291/0x1080 mm/swap.c:978 tlb_batch_pages_flush+0x85/0x160 mm/mmu_gather.c:58 tlb_flush_mmu_free mm/mmu_gather.c:255 [inline] tlb_flush_mmu mm/mmu_gather.c:262 [inline] tlb_finish_mmu+0x110/0x6c0 mm/mmu_gather.c:353 exit_mmap+0x19d/0x3f0 mm/mmap.c:3118 __mmput+0xed/0x430 kernel/fork.c:1187 exit_mm kernel/exit.c:510 [inline] do_exit+0x8c8/0x2440 kernel/exit.c:782 do_group_exit+0xb2/0x2a0 kernel/exit.c:925 __do_sys_exit_group kernel/exit.c:936 [inline] __se_sys_exit_group kernel/exit.c:934 [inline] __x64_sys_exit_group+0x35/0x40 kernel/exit.c:934 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88806f7ffe00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806f7ffe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88806f7fff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88806f7fff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88806f800000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================