================================================================== BUG: KASAN: use-after-free in __io_uring_show_fdinfo+0x69d/0x17bf io_uring/fdinfo.c:101 Read of size 1 at addr ffff888033280000 by task syz-executor.0/7764 CPU: 0 PID: 7764 Comm: syz-executor.0 Not tainted 6.0.0-syzkaller-09039-ga6afa4199d3d #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+0x1b1/0x28e lib/dump_stack.c:106 print_address_description+0x65/0x4b0 mm/kasan/report.c:317 print_report+0x108/0x1f0 mm/kasan/report.c:433 kasan_report+0xc3/0xf0 mm/kasan/report.c:495 __io_uring_show_fdinfo+0x69d/0x17bf io_uring/fdinfo.c:101 io_uring_show_fdinfo+0x185/0x3f7 io_uring/fdinfo.c:206 seq_show+0x57e/0x6b0 fs/proc/fd.c:68 seq_read_iter+0x43a/0xd30 fs/seq_file.c:230 seq_read+0x224/0x320 fs/seq_file.c:162 vfs_read+0x2ea/0xbf0 fs/read_write.c:468 ksys_pread64 fs/read_write.c:665 [inline] __do_sys_pread64 fs/read_write.c:675 [inline] __se_sys_pread64 fs/read_write.c:672 [inline] __x64_sys_pread64+0x1af/0x240 fs/read_write.c:672 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fcedb48a5a9 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:00007fcedc56b168 EFLAGS: 00000246 ORIG_RAX: 0000000000000011 RAX: ffffffffffffffda RBX: 00007fcedb5ac050 RCX: 00007fcedb48a5a9 RDX: 0000000000000011 RSI: 0000000020002140 RDI: 0000000000000007 RBP: 00007fcedb4e5580 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffca0dbe51f R14: 00007fcedc56b300 R15: 0000000000022000 The buggy address belongs to the physical page: page:ffffea0000cca000 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 pfn:0x33280 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffff88813fffab18 ffff88813fffab18 0000000000000000 raw: 0000000000000000 0000000000000007 00000000ffffff7f 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 9, migratetype Unmovable, gfp_mask 0x542dc0(GFP_USER|__GFP_NOWARN|__GFP_COMP|__GFP_ZERO|__GFP_ACCOUNT), pid 7096, tgid 7094 (syz-executor.3), ts 170639484876, free_ts 170759223559 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x742/0x7c0 mm/page_alloc.c:4283 __alloc_pages+0x259/0x560 mm/page_alloc.c:5549 __get_free_pages+0x8/0x30 mm/page_alloc.c:5598 io_mem_alloc io_uring/io_uring.c:2472 [inline] io_allocate_scq_urings+0x2c2/0x56a io_uring/io_uring.c:3340 io_uring_create+0x588/0xd6d io_uring/io_uring.c:3500 io_uring_setup io_uring/io_uring.c:3598 [inline] __do_sys_io_uring_setup io_uring/io_uring.c:3604 [inline] __se_sys_io_uring_setup io_uring/io_uring.c:3601 [inline] __x64_sys_io_uring_setup+0x217/0x290 io_uring/io_uring.c:3601 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd 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+0x812/0x900 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x7d/0x5f0 mm/page_alloc.c:3476 io_ring_ctx_free+0x874/0xaf5 io_uring/io_uring.c:2637 io_ring_exit_work+0x6cd/0x738 io_uring/io_uring.c:2798 process_one_work+0x877/0xdb0 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Memory state around the buggy address: ffff88803327ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88803327ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888033280000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888033280080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888033280100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================