syzbot


WARNING: refcount bug in nbd_config_put

Status: upstream: reported C repro on 2021/03/31 15:27
Reported-by: syzbot+fe82ccae196c926dba29@syzkaller.appspotmail.com
First crash: 1360d, last: 658d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 WARNING: refcount bug in nbd_config_put C 47 656d 1386d 0/1 upstream: reported C repro on 2021/03/06 00:49
Fix bisection attempts (4)
Created Duration User Patch Repo Result
2021/11/05 04:48 14m bisect fix linux-4.19.y error job log
2021/09/05 03:09 24m bisect fix linux-4.19.y OK (0) job log log
2021/07/03 22:00 23m bisect fix linux-4.19.y OK (0) job log log
2021/05/16 06:09 30m bisect fix linux-4.19.y OK (0) job log log

Sample crash report:
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 0 PID: 8288 at lib/refcount.c:280 refcount_dec_not_one+0x1bc/0x1d0 lib/refcount.c:280
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 8288 Comm: systemd-udevd Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 panic+0x26a/0x50e kernel/panic.c:186
 __warn.cold+0x20/0x5a kernel/panic.c:541
 report_bug+0x262/0x2b0 lib/bug.c:183
 fixup_bug arch/x86/kernel/traps.c:178 [inline]
 fixup_bug arch/x86/kernel/traps.c:173 [inline]
 do_error_trap+0x1d7/0x310 arch/x86/kernel/traps.c:296
 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:1038
RIP: 0010:refcount_dec_not_one+0x1bc/0x1d0 lib/refcount.c:280
Code: 1d d5 96 98 07 31 ff 89 de e8 f0 71 ec fd 84 db 75 89 e8 b7 70 ec fd 48 c7 c7 e0 c0 b3 88 c6 05 b5 96 98 07 01 e8 89 a8 7c 04 <0f> 0b 41 bc 01 00 00 00 e9 6a ff ff ff e8 22 91 c1 fd 66 90 41 54
RSP: 0018:ffff8880af76fbd0 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff814dff01 RDI: ffffed1015eedf6c
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: 00000000ffffffff
R13: 1ffff11015eedf7b R14: ffff8880af76fbf8 R15: ffff8880a9470868
 refcount_dec_and_mutex_lock+0x1c/0x80 lib/refcount.c:308
 nbd_put drivers/block/nbd.c:228 [inline]
 nbd_config_put+0x5bb/0x870 drivers/block/nbd.c:1185
 nbd_release+0xf4/0x170 drivers/block/nbd.c:1461
 __blkdev_put+0x636/0x870 fs/block_dev.c:1819
 blkdev_close+0x86/0xb0 fs/block_dev.c:1888
 __fput+0x2ce/0x890 fs/file_table.c:278
 task_work_run+0x148/0x1c0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:193 [inline]
 exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167
 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
 do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fab95d3a270
Code: 73 01 c3 48 8b 0d 38 7d 20 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 59 c1 20 00 00 75 10 b8 03 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ee fb ff ff 48 89 04 24
RSP: 002b:00007ffd4343bc18 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007fab95d3a270
RDX: 000000000aba9500 RSI: 0000000000000000 RDI: 0000000000000007
RBP: 00007fab96bf4710 R08: 0000000000000045 R09: 0000000000000018
R10: 000055ca705ee1b8 R11: 0000000000000246 R12: 0000000000000000
R13: 000055ca705e96e0 R14: 0000000000000003 R15: 000000000000000e
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (42):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/03/03 18:54 linux-4.19.y 3f8a27f9e27b f8902b57 .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/10/19 03:06 linux-4.19.y 3f8a27f9e27b b31320fc .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/05/23 00:16 linux-4.19.y 3f8a27f9e27b 7268fa62 .config console log report syz C ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/05/21 20:51 linux-4.19.y 3f8a27f9e27b 7268fa62 .config console log report syz C ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2021/04/16 02:04 linux-4.19.y 0f1b4cb77d7f c59079a6 .config console log report syz C ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2021/03/31 15:26 linux-4.19.y 2034d6f0838e 6a81331a .config console log report syz C ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/12/25 21:28 linux-4.19.y 3f8a27f9e27b 9da18ae8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/11/27 09:46 linux-4.19.y 3f8a27f9e27b f4470a7b .config console log report info [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/11/22 02:42 linux-4.19.y 3f8a27f9e27b 1c576c23 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/11/17 10:51 linux-4.19.y 3f8a27f9e27b 3a127a31 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/11/15 19:54 linux-4.19.y 3f8a27f9e27b 97de9cfc .config console log report info [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/11/12 07:23 linux-4.19.y 3f8a27f9e27b f42ee5d8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/11/12 01:46 linux-4.19.y 3f8a27f9e27b f42ee5d8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/11/06 21:44 linux-4.19.y 3f8a27f9e27b 6d752409 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/11/02 12:19 linux-4.19.y 3f8a27f9e27b 08977f5d .config console log report info [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/10/28 04:37 linux-4.19.y 3f8a27f9e27b 5c716ff6 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/10/23 06:18 linux-4.19.y 3f8a27f9e27b c0b80a55 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/10/21 04:23 linux-4.19.y 3f8a27f9e27b a0fd4dab .config console log report info [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/10/02 08:17 linux-4.19.y 3f8a27f9e27b feb56351 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/09/15 01:38 linux-4.19.y 3f8a27f9e27b b884348d .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/09/05 02:35 linux-4.19.y 3f8a27f9e27b 28811d0a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/09/04 08:22 linux-4.19.y 3f8a27f9e27b 28811d0a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/08/09 21:03 linux-4.19.y 3f8a27f9e27b c2a623d6 .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/08/07 15:58 linux-4.19.y 3f8a27f9e27b 88e3a122 .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/07/30 12:57 linux-4.19.y 3f8a27f9e27b fef302b1 .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/07/30 00:41 linux-4.19.y 3f8a27f9e27b fef302b1 .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/06/10 18:53 linux-4.19.y 3f8a27f9e27b 0d5abf15 .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/06/04 18:11 linux-4.19.y 3f8a27f9e27b c8857892 .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/04/15 19:55 linux-4.19.y 3f8a27f9e27b 8bcc32a6 .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/02/13 22:41 linux-4.19.y 3f8a27f9e27b 8b9ca619 .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/01/21 00:24 linux-4.19.y 3f8a27f9e27b b838eb76 .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/01/19 23:45 linux-4.19.y 3f8a27f9e27b 5da9499f .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/01/19 18:51 linux-4.19.y 3f8a27f9e27b 0620189b .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2022/01/17 12:35 linux-4.19.y 3f8a27f9e27b 731a2d23 .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2021/12/26 03:44 linux-4.19.y 3f8a27f9e27b 6caa12e4 .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2021/10/06 04:48 linux-4.19.y c2276d585654 0a63fd36 .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2021/09/19 19:56 linux-4.19.y b172b44fcb17 70b76c1d .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2021/08/06 03:09 linux-4.19.y 6ca2f514c578 d2d6e680 .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2021/07/19 00:28 linux-4.19.y fcfbdfe9626e f115ae98 .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2021/07/11 05:25 linux-4.19.y 9f84340f012e 8f5a7b8c .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2021/06/03 22:00 linux-4.19.y 1722257b8ece 0740de69 .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
2021/04/09 19:11 linux-4.19.y b4454811f122 6a81331a .config console log report info ci2-linux-4-19 WARNING: refcount bug in nbd_config_put
* Struck through repros no longer work on HEAD.