syzbot


WARNING: refcount bug in __io_queue_sqe

Status: fixed on 2021/11/10 00:50
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+a2910119328ce8e7996f@syzkaller.appspotmail.com
Fix commit: a298232ee6b9 io_uring: fix link timeout refs
First crash: 1098d, last: 1098d
Discussions (6)
Title Replies (including bot) Last reply
[PATCH 1/1] io_uring: fix link timeout refs 5 (5) 2021/08/08 09:00
[PATCH 5.10 00/24] 5.10.55-rc1 review 34 (34) 2021/07/31 07:51
[PATCH 5.12 000/292] 5.12.19-rc1 review 294 (294) 2021/07/19 17:28
[PATCH 5.10 000/137] 5.10.43-rc1 review 144 (144) 2021/06/10 09:02
[PATCH 5.12 000/161] 5.12.10-rc1 review 171 (171) 2021/06/09 20:47
[syzbot] WARNING: refcount bug in __io_queue_sqe 0 (1) 2021/05/01 05:51

Sample crash report:
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 0 PID: 10242 at lib/refcount.c:28 refcount_warn_saturate+0x15b/0x1a0 lib/refcount.c:28
Modules linked in:
CPU: 0 PID: 10242 Comm: syz-executor.2 Not tainted 5.12.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:refcount_warn_saturate+0x15b/0x1a0 lib/refcount.c:28
Code: c7 20 5a 71 8a 31 c0 e8 23 03 55 fd 0f 0b eb 85 e8 9a a0 88 fd c6 05 44 db 0b 0a 01 48 c7 c7 80 5a 71 8a 31 c0 e8 05 03 55 fd <0f> 0b e9 64 ff ff ff e8 79 a0 88 fd c6 05 24 db 0b 0a 01 48 c7 c7
RSP: 0018:ffffc90002e77928 EFLAGS: 00010246
RAX: 15eb98be5e94ee00 RBX: 0000000000000003 RCX: 0000000000040000
RDX: ffffc9000d56a000 RSI: 0000000000006606 RDI: 0000000000006607
RBP: 0000000000000003 R08: ffffffff8164f2f2 R09: ffffed1017383f1c
R10: ffffed1017383f1c R11: 0000000000000000 R12: dffffc0000000000
R13: ffff8881412ea608 R14: 00000000ffffffff R15: ffff888013dd9cdc
FS:  00007ffb95ca5700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffffd5a8690 CR3: 0000000023ce1000 CR4: 00000000001526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __refcount_sub_and_test include/linux/refcount.h:283 [inline]
 __refcount_dec_and_test include/linux/refcount.h:315 [inline]
 refcount_dec_and_test include/linux/refcount.h:333 [inline]
 io_put_req fs/io_uring.c:2140 [inline]
 io_queue_linked_timeout fs/io_uring.c:6300 [inline]
 __io_queue_sqe+0xbef/0xec0 fs/io_uring.c:6354
 io_submit_sqe fs/io_uring.c:6534 [inline]
 io_submit_sqes+0x2bbd/0x7c50 fs/io_uring.c:6660
 __do_sys_io_uring_enter fs/io_uring.c:9240 [inline]
 __se_sys_io_uring_enter+0x256/0x1d60 fs/io_uring.c:9182
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x466459
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:00007ffb95ca5188 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459
RDX: 0000000000000000 RSI: 00000000000055bc RDI: 0000000000000003
RBP: 00000000004bf9fb R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffcaf4241ff R14: 00007ffb95ca5300 R15: 0000000000022000

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/04/21 23:00 upstream 16fc44d6387e 2bc8999a .config console log report info ci-upstream-kasan-gce-smack-root WARNING: refcount bug in __io_queue_sqe
* Struck through repros no longer work on HEAD.