syzbot


WARNING: refcount bug in blk_mq_free_request

Status: auto-closed as invalid on 2019/05/29 00:00
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+5476726e7cb6a2d59bce@syzkaller.appspotmail.com
First crash: 2142d, last: 2142d
Discussions (1)
Title Replies (including bot) Last reply
WARNING: refcount bug in blk_mq_free_request 0 (1) 2018/12/05 19:47
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: refcount bug in blk_mq_free_request (3) block 1 1232d 1228d 0/28 auto-closed as invalid on 2021/09/25 02:34
upstream WARNING: refcount bug in blk_mq_free_request (2) block C done error 5 1894d 1894d 15/28 fixed on 2020/06/30 18:57
linux-5.15 WARNING: refcount bug in blk_mq_free_request origin:lts-only C error 9 8d02h 64d 0/3 upstream: reported C repro on 2024/08/08 02:49

Sample crash report:
Buffer I/O error on dev nbd0, logical block 2, async page read
block nbd0: Connection timed out, retrying (0/3 alive)
 nbd0: unable to read partition table
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 1 PID: 2551 at lib/refcount.c:187 refcount_sub_and_test_checked+0x2c9/0x310 lib/refcount.c:187
Kernel panic - not syncing: panic_on_warn set ...
nbd0: partition table beyond EOD, truncated
CPU: 1 PID: 2551 Comm: kworker/1:2H Not tainted 4.20.0-rc4+ #134
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: kblockd blk_mq_run_work_fn
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x244/0x39d lib/dump_stack.c:113
 panic+0x2ad/0x55c kernel/panic.c:188
 __warn.cold.8+0x20/0x45 kernel/panic.c:540
 report_bug+0x254/0x2d0 lib/bug.c:186
 fixup_bug arch/x86/kernel/traps.c:178 [inline]
 do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:271
 do_invalid_op+0x36/0x40 arch/x86/kernel/traps.c:290
 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:969
RIP: 0010:refcount_sub_and_test_checked+0x2c9/0x310 lib/refcount.c:187
Code: 89 de e8 9a 13 ed fd 84 db 74 07 31 db e9 4d ff ff ff e8 ba 12 ed fd 48 c7 c7 e0 b1 60 88 c6 05 93 46 80 06 01 e8 f7 72 b6 fd <0f> 0b 31 db e9 2c ff ff ff 48 89 cf e8 46 66 30 fe e9 41 fe ff ff
RSP: 0018:ffff8881b1aeec00 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8165eaf5 RDI: 0000000000000005
RBP: ffff8881b1aeece8 R08: ffff8881c142c440 R09: ffffed103b5e3ef8
R10: ffffed103b5e3ef8 R11: ffff8881daf1f7c7 R12: ffff8881d175aed8
R13: 00000000ffffffff R14: ffff8881b1aeecc0 R15: 1ffff1103635ddb3
 refcount_dec_and_test_checked+0x1a/0x20 lib/refcount.c:212
 blk_mq_free_request+0x643/0x900 block/blk-mq.c:517
 __blk_mq_end_request block/blk-mq.c:542 [inline]
 blk_mq_end_request+0x2a4/0x490 block/blk-mq.c:551
 blk_mq_dispatch_rq_list+0x132d/0x2500 block/blk-mq.c:1210
 blk_mq_do_dispatch_sched+0x25b/0x580 block/blk-mq-sched.c:107
 blk_mq_sched_dispatch_requests+0x62d/0x9b0 block/blk-mq-sched.c:203
 __blk_mq_run_hw_queue+0x199/0x2e0 block/blk-mq.c:1314
 blk_mq_run_work_fn+0x51/0x70 block/blk-mq.c:1547
 process_one_work+0xc90/0x1c40 kernel/workqueue.c:2153
 worker_thread+0x17f/0x1390 kernel/workqueue.c:2296
 kthread+0x35a/0x440 kernel/kthread.c:246
 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/11/29 23:59 upstream 60b548237fed 66071e27 .config console log report ci-upstream-kasan-gce-selinux-root
* Struck through repros no longer work on HEAD.