refcount_t: underflow; use-after-free. WARNING: lib/refcount.c:28 at refcount_warn_saturate+0xf4/0x130 lib/refcount.c:28, CPU#0: syz-executor/17742 Modules linked in: CPU: 0 UID: 0 PID: 17742 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:ffffc900069bf938 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff888030f03478 RCX: ffffffff84f962bb RDX: ffff88805b2ca540 RSI: ffffffff84f9634d RDI: ffffffff90e1a980 RBP: 0000000000000003 R08: 0000000000000005 R09: 0000000000000004 R10: 0000000000000003 R11: 0000000000000001 R12: ffff88803e2ec800 R13: ffff888030f03478 R14: ffffffff86358ac0 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff8880d6387000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fbc32420478 CR3: 000000002f4bc000 CR4: 0000000000352ef0 DR0: 0000000000003e61 DR1: 0000000000000000 DR2: 00000000000000b7 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+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 __do_sys_exit_group kernel/exit.c:1130 [inline] __se_sys_exit_group kernel/exit.c:1128 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1128 x64_sys_call+0x102c/0x1530 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f8c3119ce59 Code: Unable to access opcode bytes at 0x7f8c3119ce2f. RSP: 002b:00007ffe6df6cc28 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00007f8c31233200 RCX: 00007f8c3119ce59 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000043 RBP: 00007f8c31208db8 R08: 0000000000000000 R09: 000000000000002e R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 000000000000002e R14: 0000000000000025 R15: 00007ffe6df6cd62 ---------------- 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