Bluetooth: hci0: Opcode 0x0c1a failed: -110 Bluetooth: hci0: Error when powering off device on rfkill (-110) ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: lib/refcount.c:28 at refcount_warn_saturate+0xc9/0x120 lib/refcount.c:28, CPU#1: kworker/1:2/5307 Modules linked in: CPU: 1 UID: 0 PID: 5307 Comm: kworker/1:2 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: events rfkill_op_handler RIP: 0010:refcount_warn_saturate+0xc9/0x120 lib/refcount.c:28 Code: 5d e9 bb d8 11 fd e8 b6 d8 11 fd 48 8d 3d 7f 21 e5 0b 67 48 0f b9 3a 5b 5d e9 a3 d8 11 fd e8 9e d8 11 fd 48 8d 3d 77 21 e5 0b <67> 48 0f b9 3a 5b 5d e9 8b d8 11 fd e8 86 d8 11 fd 48 8d 3d 6f 21 RSP: 0018:ffffc900041c77d8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000000003 RCX: ffffffff84ad265c RDX: ffff88802d53a4c0 RSI: ffffffff84ad26c2 RDI: ffffffff90924840 RBP: ffff888035582078 R08: 0000000000000005 R09: 0000000000000004 R10: 0000000000000003 R11: 0000000000002ba1 R12: ffff88802204fc00 R13: ffff888035582078 R14: ffffffff85e718b0 R15: ffffffff906c1320 FS: 0000000000000000(0000) GS:ffff8880d69f1000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000056106d67c300 CR3: 0000000042a39000 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:5327 hci_dev_do_close+0x2e/0xc0 net/bluetooth/hci_core.c:501 hci_rfkill_set_block+0x225/0x3b0 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: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 bb d8 11 fd jmp 0xfd11d8c1 6: e8 b6 d8 11 fd call 0xfd11d8c1 b: 48 8d 3d 7f 21 e5 0b lea 0xbe5217f(%rip),%rdi # 0xbe52191 12: 67 48 0f b9 3a ud1 (%edx),%rdi 17: 5b pop %rbx 18: 5d pop %rbp 19: e9 a3 d8 11 fd jmp 0xfd11d8c1 1e: e8 9e d8 11 fd call 0xfd11d8c1 23: 48 8d 3d 77 21 e5 0b lea 0xbe52177(%rip),%rdi # 0xbe521a1 * 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction 2f: 5b pop %rbx 30: 5d pop %rbp 31: e9 8b d8 11 fd jmp 0xfd11d8c1 36: e8 86 d8 11 fd call 0xfd11d8c1 3b: 48 rex.W 3c: 8d .byte 0x8d 3d: 3d .byte 0x3d 3e: 6f outsl %ds:(%rsi),(%dx) 3f: 21 .byte 0x21