Syzkaller hit 'WARNING: refcount bug in io_put_req - Fixed' bug. ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 1 PID: 5333 at lib/refcount.c:28 refcount_warn_saturate+0x103/0x1f0 Modules linked in: CPU: 1 PID: 5333 Comm: syz-executor.4 Not tainted 5.10.45 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 RIP: 0010:refcount_warn_saturate+0x103/0x1f0 Code: 1d f4 a4 54 03 31 ff 89 de e8 f9 73 51 ff 84 db 75 a3 e8 c0 7a 51 ff 48 c7 c7 20 34 3b 84 c6 05 d4 a4 54 03 01 e8 0d 97 c8 01 <0f> 0b eb 87 e8 a4 7a 51 ff 0f b6 1d bd a4 54 03 31 ff 89 de e8 c4 RSP: 0018:ffff8880218b79f8 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff88800ea5e500 RSI: ffffffff812943f3 RDI: ffffed1004316f31 RBP: ffff88800ee3505c R08: 0000000000000001 R09: ffff88806cf2facf R10: 0000000000000000 R11: 0000000000000001 R12: ffff88800ee3505c R13: dffffc0000000000 R14: ffff8880088da2d8 R15: 0000000000000002 FS: 00007f19527f9700(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020002a40 CR3: 000000001768e000 CR4: 0000000000350ee0 Call Trace: io_put_req+0xc6/0x100 __io_queue_sqe+0x1df/0xd00 io_queue_sqe+0x5bc/0x1020 io_submit_sqes+0x176b/0x2300 __do_sys_io_uring_enter+0x1092/0x1910 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x466609 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f19527f9188 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 000000000056c0f0 RCX: 0000000000466609 RDX: 0000000000000000 RSI: 00000000000076d3 RDI: 0000000000000003 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c0f0 R13: 00007fff978c8a3f R14: 00007f19527f9300 R15: 0000000000022000 irq event stamp: 1045 hardirqs last enabled at (1055): [] console_unlock+0x929/0xb30 hardirqs last disabled at (1064): [] console_unlock+0x835/0xb30 softirqs last enabled at (918): [] asm_call_irq_on_stack+0x12/0x20 softirqs last disabled at (913): [] asm_call_irq_on_stack+0x12/0x20 ---[ end trace 5379572b448f201b ]--- Syzkaller reproducer: # {Threaded:true Collide:true Repeat:true RepeatTimes:0 Procs:8 Slowdown:1 Sandbox:none Fault:false FaultCall:-1 FaultNth:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:true USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true UseTmpDir:true HandleSegv:true Repro:false Trace:false} crepro: false r0 = syz_io_uring_setup(0x21, &(0x7f0000000080)={0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, &(0x7f00000a0000)=nil, &(0x7f00000b0000)=nil, &(0x7f0000000180)=0x0, &(0x7f0000002a40)=0x0) syz_io_uring_submit(r1, r2, 0x0, 0x8) syz_io_uring_submit(r1, r2, &(0x7f0000000300)=@IORING_OP_LINK_TIMEOUT={0xf, 0x2, 0x0, 0x0, 0x0, &(0x7f0000000140)}, 0x0) syz_io_uring_submit(r1, r2, &(0x7f0000001a40)=@IORING_OP_REMOVE_BUFFERS={0x1f, 0x4, 0x0, 0x80}, 0x3528e708) io_uring_enter(r0, 0x76d3, 0x0, 0x0, 0x0, 0x0)