Bluetooth: hci2: Injecting HCI hardware error event Bluetooth: hci2: hardware error 0x00 ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: lib/refcount.c:28 at refcount_warn_saturate+0xc9/0x120 lib/refcount.c:28, CPU#3: kworker/u33:0/64 Modules linked in: CPU: 3 UID: 0 PID: 64 Comm: kworker/u33:0 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~bpo12+1 04/01/2014 Workqueue: hci2 hci_error_reset RIP: 0010:refcount_warn_saturate+0xc9/0x120 lib/refcount.c:28 Code: 5d e9 7b d0 13 fd e8 76 d0 13 fd 48 8d 3d ff 05 e8 0b 67 48 0f b9 3a 5b 5d e9 63 d0 13 fd e8 5e d0 13 fd 48 8d 3d f7 05 e8 0b <67> 48 0f b9 3a 5b 5d e9 4b d0 13 fd e8 46 d0 13 fd 48 8d 3d ef 05 RSP: 0018:ffffc90000a0f888 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000000003 RCX: ffffffff84aa8cac RDX: ffff8880209cc980 RSI: ffffffff84aa8d12 RDI: ffffffff90929310 RBP: ffff88804f36f078 R08: 0000000000000005 R09: 0000000000000004 R10: 0000000000000003 R11: ffff8880209cd4b0 R12: ffff88801369b800 R13: ffff88804f36f078 R14: ffffffff85e459c0 R15: ffffffff906c3860 FS: 0000000000000000(0000) GS:ffff8880979f9000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000577ab4c0 CR3: 00000000298ff000 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+0x11b/0x1b0 lib/klist.c:217 klist_del lib/klist.c:230 [inline] klist_remove+0x13f/0x2e0 lib/klist.c:249 device_move+0x12d/0x1160 drivers/base/core.c:4615 hci_conn_del_sysfs+0xaa/0x1a0 net/bluetooth/hci_sysfs.c:75 hci_conn_cleanup net/bluetooth/hci_conn.c:173 [inline] hci_conn_del+0x680/0x11d0 net/bluetooth/hci_conn.c:1234 hci_conn_hash_flush+0x186/0x290 net/bluetooth/hci_conn.c:2638 hci_dev_close_sync+0x601/0x1260 net/bluetooth/hci_sync.c:5326 hci_dev_do_close+0x2e/0xc0 net/bluetooth/hci_core.c:501 hci_error_reset+0xbf/0x390 net/bluetooth/hci_core.c:1034 process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257 process_scheduled_works kernel/workqueue.c:3340 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 ---------------- Code disassembly (best guess): 0: 5d pop %rbp 1: e9 7b d0 13 fd jmp 0xfd13d081 6: e8 76 d0 13 fd call 0xfd13d081 b: 48 8d 3d ff 05 e8 0b lea 0xbe805ff(%rip),%rdi # 0xbe80611 12: 67 48 0f b9 3a ud1 (%edx),%rdi 17: 5b pop %rbx 18: 5d pop %rbp 19: e9 63 d0 13 fd jmp 0xfd13d081 1e: e8 5e d0 13 fd call 0xfd13d081 23: 48 8d 3d f7 05 e8 0b lea 0xbe805f7(%rip),%rdi # 0xbe80621 * 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction 2f: 5b pop %rbx 30: 5d pop %rbp 31: e9 4b d0 13 fd jmp 0xfd13d081 36: e8 46 d0 13 fd call 0xfd13d081 3b: 48 rex.W 3c: 8d .byte 0x8d 3d: 3d .byte 0x3d 3e: ef out %eax,(%dx) 3f: 05 .byte 0x5