Bluetooth: hci3: Opcode 0x0c1a failed: -110 Bluetooth: hci3: Error when powering off device on rfkill (-110) ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: lib/refcount.c:28 at 0x0, CPU#1: kworker/1:5/13308 Modules linked in: CPU: 1 UID: 0 PID: 13308 Comm: kworker/1:5 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: events rfkill_op_handler RIP: 0010:refcount_warn_saturate+0xc9/0x120 lib/refcount.c:28 Code: 5d e9 0b c9 1a fd e8 06 c9 1a fd 48 8d 3d af e7 cc 0b 67 48 0f b9 3a 5b 5d e9 f3 c8 1a fd e8 ee c8 1a fd 48 8d 3d a7 e7 cc 0b <67> 48 0f b9 3a 5b 5d e9 db c8 1a fd e8 d6 c8 1a fd 48 8d 3d 9f e7 RSP: 0018:ffffc9000484f7d8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000000003 RCX: ffffffff84a2890c RDX: ffff88801bfb8000 RSI: ffffffff84a28972 RDI: ffffffff906f7120 RBP: ffff88806e2cd478 R08: 0000000000000005 R09: 0000000000000004 R10: 0000000000000003 R11: 000000000b9d6c44 R12: ffff888012188000 R13: ffff88806e2cd478 R14: ffffffff85d883d0 R15: ffffffff90495fa0 FS: 0000000000000000(0000) GS:ffff888097aa3000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000f7464f9c CR3: 0000000050926000 CR4: 0000000000352ef0 DR0: 0000000000000004 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 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/0x10d0 drivers/base/core.c:4615 hci_conn_del_sysfs+0x81/0x180 net/bluetooth/hci_sysfs.c:75 hci_conn_cleanup net/bluetooth/hci_conn.c:173 [inline] hci_conn_del+0x657/0x1180 net/bluetooth/hci_conn.c:1222 hci_conn_hash_flush+0x186/0x260 net/bluetooth/hci_conn.c:2615 hci_dev_close_sync+0x602/0x11d0 net/bluetooth/hci_sync.c:5308 hci_dev_do_close+0x2e/0x90 net/bluetooth/hci_core.c:501 hci_rfkill_set_block+0x225/0x360 net/bluetooth/hci_core.c:929 rfkill_set_block+0x1fe/0x550 net/rfkill/core.c:346 rfkill_epo+0x8e/0x1d0 net/rfkill/core.c:466 __rfkill_handle_global_op net/rfkill/input.c:60 [inline] rfkill_op_handler+0x25c/0x270 net/rfkill/input.c:108 process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3263 process_scheduled_works kernel/workqueue.c:3346 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427 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 0b c9 1a fd jmp 0xfd1ac911 6: e8 06 c9 1a fd call 0xfd1ac911 b: 48 8d 3d af e7 cc 0b lea 0xbcce7af(%rip),%rdi # 0xbcce7c1 12: 67 48 0f b9 3a ud1 (%edx),%rdi 17: 5b pop %rbx 18: 5d pop %rbp 19: e9 f3 c8 1a fd jmp 0xfd1ac911 1e: e8 ee c8 1a fd call 0xfd1ac911 23: 48 8d 3d a7 e7 cc 0b lea 0xbcce7a7(%rip),%rdi # 0xbcce7d1 * 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction 2f: 5b pop %rbx 30: 5d pop %rbp 31: e9 db c8 1a fd jmp 0xfd1ac911 36: e8 d6 c8 1a fd call 0xfd1ac911 3b: 48 rex.W 3c: 8d .byte 0x8d 3d: 3d .byte 0x3d 3e: 9f lahf 3f: e7 .byte 0xe7