------------[ 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: syz-executor/2424 Modules linked in: CPU: 2 UID: 0 PID: 2424 Comm: syz-executor 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 RIP: 0010:refcount_warn_saturate+0xf4/0x130 lib/refcount.c:28 Code: cc e8 50 4e 0f fd 48 8d 3d 39 46 e8 0b 67 48 0f b9 3a e8 3f 4e 0f fd 5b 5d e9 58 69 93 06 e8 33 4e 0f fd 48 8d 3d 2c 46 e8 0b <67> 48 0f b9 3a e8 22 4e 0f fd 5b 5d c3 cc cc cc cc e8 16 4e 0f fd RSP: 0018:ffffc90006b4f6d8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff888027ed8078 RCX: ffffffff84f962bb RDX: ffff888044dd4a80 RSI: ffffffff84f9634d RDI: ffffffff90e1a980 RBP: 0000000000000003 R08: 0000000000000005 R09: 0000000000000004 R10: 0000000000000003 R11: 0000000000000001 R12: ffff88804d785800 R13: ffff888027ed8078 R14: ffffffff86358ac0 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff8880d6587000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f133c2dea90 CR3: 00000000375bc000 CR4: 0000000000352ef0 DR0: 0000000000000101 DR1: 0000000000000007 DR2: 000000000000000f DR3: 0000000000000006 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+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:4632 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:1309 hci_conn_hash_flush+0x186/0x280 net/bluetooth/hci_conn.c:2737 hci_dev_close_sync+0x5cf/0x13c0 net/bluetooth/hci_sync.c:5383 hci_dev_do_close+0x2e/0xb0 net/bluetooth/hci_core.c:502 hci_unregister_dev+0x227/0x670 net/bluetooth/hci_core.c:2679 vhci_release+0x17d/0x230 drivers/bluetooth/hci_vhci.c:690 __fput+0x3ff/0xb50 fs/file_table.c:510 task_work_run+0x150/0x240 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x951/0x2af0 kernel/exit.c:976 do_group_exit+0xd5/0x2a0 kernel/exit.c:1119 get_signal+0x20ff/0x2210 kernel/signal.c:3038 arch_do_signal_or_restart+0x91/0x7e0 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline] exit_to_user_mode_loop+0x98/0x670 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline] do_syscall_64+0x666/0x870 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fad3415d68e Code: Unable to access opcode bytes at 0x7fad3415d664. RSP: 002b:00007ffee122b268 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: fffffffffffffe00 RBX: 0000555588dd9500 RCX: 00007fad3415d68e RDX: 0000000000000030 RSI: 00007ffee122b360 RDI: 00000000000000f9 RBP: 00007ffee122b30c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000258 R13: 00000000000927c0 R14: 00000000000d8673 R15: 00007ffee122b360 ---------------- Code disassembly (best guess): 0: cc int3 1: e8 50 4e 0f fd call 0xfd0f4e56 6: 48 8d 3d 39 46 e8 0b lea 0xbe84639(%rip),%rdi # 0xbe84646 d: 67 48 0f b9 3a ud1 (%edx),%rdi 12: e8 3f 4e 0f fd call 0xfd0f4e56 17: 5b pop %rbx 18: 5d pop %rbp 19: e9 58 69 93 06 jmp 0x6936976 1e: e8 33 4e 0f fd call 0xfd0f4e56 23: 48 8d 3d 2c 46 e8 0b lea 0xbe8462c(%rip),%rdi # 0xbe84656 * 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction 2f: e8 22 4e 0f fd call 0xfd0f4e56 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 16 4e 0f fd call 0xfd0f4e56