------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: lib/refcount.c:28 at 0x0, CPU#0: syz.1.3849/18902 Modules linked in: CPU: 0 UID: 0 PID: 18902 Comm: syz.1.3849 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 RIP: 0010:refcount_warn_saturate+0xc9/0x120 lib/refcount.c:28 Code: 5d e9 0b e2 12 fd e8 06 e2 12 fd 48 8d 3d 7f 78 e5 0b 67 48 0f b9 3a 5b 5d e9 f3 e1 12 fd e8 ee e1 12 fd 48 8d 3d 77 78 e5 0b <67> 48 0f b9 3a 5b 5d e9 db e1 12 fd e8 d6 e1 12 fd 48 8d 3d 6f 78 RSP: 0018:ffffc90004e876f8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000000003 RCX: ffffffff84ac021c RDX: ffff888053610000 RSI: ffffffff84ac0282 RDI: ffffffff90917b00 RBP: ffff888040109078 R08: 0000000000000005 R09: 0000000000000004 R10: 0000000000000003 R11: 0000000000000001 R12: ffff888035232800 R13: ffff888040109078 R14: ffffffff85e5c140 R15: ffffffff906b56a0 FS: 0000000000000000(0000) GS:ffff8880d6907000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffdc489dba8 CR3: 000000003b538000 CR4: 0000000000352ef0 DR0: ffffffffffffffff DR1: 00000000000001f8 DR2: 0000000000000083 DR3: ffffffffefffff15 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/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_unregister_dev+0x227/0x680 net/bluetooth/hci_core.c:2715 vhci_release+0x17d/0x230 drivers/bluetooth/hci_vhci.c:690 __fput+0x402/0xb70 fs/file_table.c:468 task_work_run+0x150/0x240 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x87f/0x2bd0 kernel/exit.c:971 do_group_exit+0xd3/0x2a0 kernel/exit.c:1112 get_signal+0x2671/0x26d0 kernel/signal.c:3034 arch_do_signal_or_restart+0x8f/0x7e0 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:41 [inline] exit_to_user_mode_loop+0x8c/0x540 kernel/entry/common.c:75 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline] do_syscall_64+0x4ee/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fa5699c2085 Code: Unable to access opcode bytes at 0x7fa5699c205b. RSP: 002b:00007fa56a78cf80 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6 RAX: fffffffffffffdfc RBX: 00007fa569be5fa0 RCX: 00007fa5699c2085 RDX: 00007fa56a78cfc0 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007fa569a13f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 00007fa569be6038 R14: 00007fa569be5fa0 R15: 00007ffdc48a10a8 ---------------- Code disassembly (best guess): 0: 5d pop %rbp 1: e9 0b e2 12 fd jmp 0xfd12e211 6: e8 06 e2 12 fd call 0xfd12e211 b: 48 8d 3d 7f 78 e5 0b lea 0xbe5787f(%rip),%rdi # 0xbe57891 12: 67 48 0f b9 3a ud1 (%edx),%rdi 17: 5b pop %rbx 18: 5d pop %rbp 19: e9 f3 e1 12 fd jmp 0xfd12e211 1e: e8 ee e1 12 fd call 0xfd12e211 23: 48 8d 3d 77 78 e5 0b lea 0xbe57877(%rip),%rdi # 0xbe578a1 * 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction 2f: 5b pop %rbx 30: 5d pop %rbp 31: e9 db e1 12 fd jmp 0xfd12e211 36: e8 d6 e1 12 fd call 0xfd12e211 3b: 48 rex.W 3c: 8d .byte 0x8d 3d: 3d .byte 0x3d 3e: 6f outsl %ds:(%rsi),(%dx) 3f: 78 .byte 0x78