syzbot


WARNING: refcount bug in l2cap_chan_put

Status: fixed on 2020/11/16 12:12
Reported-by: syzbot+198362c76088d1515529@syzkaller.appspotmail.com
Fix commit: b83764f9220a Bluetooth: Fix kernel oops triggered by hci_adv_monitors_clear()
First crash: 1514d, last: 1350d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: WARNING in sysfs_warn_dup (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit b83764f9220a4a14525657466f299850bbc98de9
Author: Miao-chen Chou <mcchou@chromium.org>
Date: Tue Jun 30 03:15:00 2020 +0000

  Bluetooth: Fix kernel oops triggered by hci_adv_monitors_clear()

  
Discussions (1)
Title Replies (including bot) Last reply
WARNING: refcount bug in l2cap_chan_put 4 (6) 2020/11/11 13:26
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2020/09/05 21:12 3h53m bisect fix upstream job log (1)
2020/04/15 12:27 20m bisect fix upstream job log (0) log

Sample crash report:
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 1 PID: 23 at lib/refcount.c:28 refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 23 Comm: kworker/1:1 Not tainted 5.8.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events do_enable_set
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x18f/0x20d lib/dump_stack.c:118
 panic+0x2e3/0x75c kernel/panic.c:231
 __warn.cold+0x20/0x45 kernel/panic.c:600
 report_bug+0x1bd/0x210 lib/bug.c:198
 handle_bug+0x38/0x90 arch/x86/kernel/traps.c:235
 exc_invalid_op+0x14/0x40 arch/x86/kernel/traps.c:255
 asm_exc_invalid_op+0x12/0x20 arch/x86/include/asm/idtentry.h:536
RIP: 0010:refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28
Code: e9 db fe ff ff 48 89 df e8 3c 86 1b fe e9 8a fe ff ff e8 72 fe db fd 48 c7 c7 20 6c 93 88 c6 05 c1 8c 12 07 01 e8 d1 0f ad fd <0f> 0b e9 af fe ff ff 0f 1f 84 00 00 00 00 00 41 56 41 55 41 54 55
RSP: 0018:ffffc90000df7bd0 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff8880a97f8000 RSI: ffffffff815d8ea7 RDI: fffff520001bef6c
RBP: 0000000000000003 R08: 0000000000000001 R09: ffff8880ae731927
R10: 0000000000000000 R11: 0000000000003254 R12: ffff888097ce1018
R13: ffff88809e31fd10 R14: ffff8880a97ac600 R15: ffff88809e31fd00
 refcount_sub_and_test include/linux/refcount.h:274 [inline]
 refcount_dec_and_test include/linux/refcount.h:294 [inline]
 kref_put include/linux/kref.h:64 [inline]
 l2cap_chan_put+0x1d3/0x230 net/bluetooth/l2cap_core.c:502
 do_enable_set+0x4f9/0x980 net/bluetooth/6lowpan.c:1083
 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269
 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415
 kthread+0x3b5/0x4a0 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/08/06 04:29 upstream fffe3ae0ee84 0487ea6f .config console log report syz C ci-upstream-kasan-gce-root
2020/08/04 19:42 upstream c0842fbc1b18 80a06902 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/08/02 20:44 upstream ac3a0c847296 63a73341 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/05/14 13:50 upstream 24085f70a6e1 2d572622 .config console log report syz C ci-upstream-kasan-gce
2020/03/04 21:34 upstream 63623fd44972 c88c7b75 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/03/03 09:03 upstream 63623fd44972 c88c7b75 .config console log report syz C ci-upstream-kasan-gce-root
2020/02/29 17:22 upstream f8788d86ab28 59b57593 .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/05/19 18:36 linux-next ac935d227366 6d882fd2 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/03/16 12:05 linux-next 770fbb32d34e 749688d2 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/02/23 18:51 linux-next bee46b309a13 2c36e7a7 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2020/07/19 08:25 upstream f932d58abc38 9c812472 .config console log report ci-qemu-upstream
2020/06/09 12:08 upstream 7ae77150d94d 0d60b78a .config console log report ci-upstream-kasan-gce
2020/05/09 14:12 upstream d5eeab8d7e26 88cb3e92 .config console log report ci-upstream-kasan-gce
* Struck through repros no longer work on HEAD.