================================================================== 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+0x625/0x1947 io_uring/fdinfo.c:206 Read of size 8 at addr ffff8880850f4aa0 by task syz-executor.4/4365 CPU: 1 PID: 4365 Comm: syz-executor.4 Not tainted 6.0.0-syzkaller-09589-g55be6084c8e0 #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+0xcd/0x134 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+0x625/0x1947 io_uring/fdinfo.c:206 seq_show+0x587/0x800 fs/proc/fd.c:68 traverse.part.0+0xcf/0x5f0 fs/seq_file.c:111 traverse fs/seq_file.c:101 [inline] seq_lseek+0x16f/0x3f0 fs/seq_file.c:323 vfs_llseek fs/read_write.c:289 [inline] ksys_lseek+0x13b/0x1a0 fs/read_write.c:302 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:0x7f588828b5a9 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:00007f5889373168 EFLAGS: 00000246 ORIG_RAX: 0000000000000008 RAX: ffffffffffffffda RBX: 00007f58883ac050 RCX: 00007f588828b5a9 RDX: 0000000000000000 RSI: 00000000000000a2 RDI: 0000000000000005 RBP: 00007f58882e6580 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdb35dcfaf R14: 00007f5889373300 R15: 0000000000022000 The buggy address belongs to the physical page: page:ffffea0002143d00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x850f4 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) 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 0x141cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_WRITE), pid 4008, tgid 4008 (syz-executor.2), ts 249971934149, free_ts 250688457127 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:5549 alloc_pages+0x1a6/0x270 mm/mempolicy.c:2270 folio_alloc+0x1c/0x70 mm/mempolicy.c:2280 filemap_alloc_folio+0x306/0x3a0 mm/filemap.c:970 __filemap_get_folio+0x328/0xed0 mm/filemap.c:1970 pagecache_get_page+0x2e/0x290 mm/folio-compat.c:104 ext4_da_write_begin+0x3f3/0xae0 fs/ext4/inode.c:2995 generic_perform_write+0x246/0x560 mm/filemap.c:3745 ext4_buffered_write_iter+0x15b/0x460 fs/ext4/file.c:285 ext4_file_write_iter+0x8b8/0x16e0 fs/ext4/file.c:700 __kernel_write_iter+0x25e/0x730 fs/read_write.c:517 dump_emit_page fs/coredump.c:857 [inline] dump_user_range+0x230/0x700 fs/coredump.c:908 elf_core_dump+0x26de/0x3510 fs/binfmt_elf.c:2311 do_coredump+0x2732/0x3c40 fs/coredump.c:755 get_signal+0x1be1/0x2430 kernel/signal.c:2844 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_list+0x16f/0xb90 mm/page_alloc.c:3522 release_pages+0xbd3/0x1400 mm/swap.c:1012 __pagevec_release+0x77/0x100 mm/swap.c:1032 pagevec_release include/linux/pagevec.h:71 [inline] folio_batch_release include/linux/pagevec.h:135 [inline] truncate_inode_pages_range+0x318/0x1510 mm/truncate.c:373 ext4_evict_inode+0x561/0x1d40 fs/ext4/inode.c:221 evict+0x2ed/0x6b0 fs/inode.c:664 iput_final fs/inode.c:1747 [inline] iput.part.0+0x55d/0x810 fs/inode.c:1773 iput+0x58/0x70 fs/inode.c:1763 dentry_unlink_inode+0x2b1/0x460 fs/dcache.c:401 __dentry_kill+0x3c0/0x640 fs/dcache.c:607 dentry_kill fs/dcache.c:745 [inline] dput+0x64d/0xdb0 fs/dcache.c:913 __fput+0x3cc/0xa90 fs/file_table.c:328 task_work_run+0xdd/0x1a0 kernel/task_work.c:177 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xb2f/0x2a20 kernel/exit.c:813 do_group_exit+0xd0/0x2a0 kernel/exit.c:943 Memory state around the buggy address: ffff8880850f4980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880850f4a00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8880850f4a80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880850f4b00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880850f4b80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================