Bluetooth: hci3: Injecting HCI hardware error event Bluetooth: hci3: hardware error 0x00 ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: lib/refcount.c:28 at refcount_warn_saturate+0xf4/0x130 lib/refcount.c:28, CPU#2: kworker/u33:7/5944 Modules linked in: CPU: 2 UID: 0 PID: 5944 Comm: kworker/u33:7 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Workqueue: hci3 hci_error_reset RIP: 0010:refcount_warn_saturate+0xf4/0x130 lib/refcount.c:28 Code: cc e8 a0 e3 11 fd 48 8d 3d 59 27 ed 0b 67 48 0f b9 3a e8 8f e3 11 fd 5b 5d e9 48 42 9d 06 e8 83 e3 11 fd 48 8d 3d 4c 27 ed 0b <67> 48 0f b9 3a e8 72 e3 11 fd 5b 5d c3 cc cc cc cc e8 66 e3 11 fd RSP: 0018:ffffc9000398f8e8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff88802fa46078 RCX: ffffffff84f7190b RDX: ffff88802d328000 RSI: ffffffff84f7199d RDI: ffffffff90e440f0 RBP: 0000000000000003 R08: 0000000000000005 R09: 0000000000000004 R10: 0000000000000003 R11: 000000000000761b R12: ffff88802fa84400 R13: ffff88802fa46078 R14: ffffffff86304340 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff8880d6539000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000037d51000 CR4: 0000000000352ef0 Call Trace: __refcount_sub_and_test include/linux/refcount.h:400 [inline] __refcount_dec_and_test include/linux/refcount.h:432 [inline] refcount_dec_and_test include/linux/refcount.h:450 [inline] kref_put include/linux/kref.h:64 [inline] klist_dec_and_del lib/klist.c:206 [inline] klist_put+0x18a/0x1d0 lib/klist.c:217 klist_del lib/klist.c:230 [inline] klist_remove+0x14c/0x2e0 lib/klist.c:249 device_move+0x12d/0x1140 drivers/base/core.c:4617 hci_conn_del_sysfs+0x86/0x1a0 net/bluetooth/hci_sysfs.c:75 hci_conn_cleanup net/bluetooth/hci_conn.c:173 [inline] hci_conn_del+0x506/0x1180 net/bluetooth/hci_conn.c:1240 hci_conn_hash_flush+0x186/0x280 net/bluetooth/hci_conn.c:2651 hci_dev_close_sync+0x5a7/0x1240 net/bluetooth/hci_sync.c:5368 hci_dev_do_close+0x2e/0xb0 net/bluetooth/hci_core.c:502 hci_error_reset+0xbf/0x380 net/bluetooth/hci_core.c:1035 process_one_work+0xa23/0x19a0 kernel/workqueue.c:3276 process_scheduled_works kernel/workqueue.c:3359 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3440 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x754/0xd80 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 ---------------- Code disassembly (best guess): 0: cc int3 1: e8 a0 e3 11 fd call 0xfd11e3a6 6: 48 8d 3d 59 27 ed 0b lea 0xbed2759(%rip),%rdi # 0xbed2766 d: 67 48 0f b9 3a ud1 (%edx),%rdi 12: e8 8f e3 11 fd call 0xfd11e3a6 17: 5b pop %rbx 18: 5d pop %rbp 19: e9 48 42 9d 06 jmp 0x69d4266 1e: e8 83 e3 11 fd call 0xfd11e3a6 23: 48 8d 3d 4c 27 ed 0b lea 0xbed274c(%rip),%rdi # 0xbed2776 * 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction 2f: e8 72 e3 11 fd call 0xfd11e3a6 34: 5b pop %rbx 35: 5d pop %rbp 36: c3 ret 37: cc int3 38: cc int3 39: cc int3 3a: cc int3 3b: e8 66 e3 11 fd call 0xfd11e3a6