------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 2 PID: 28240 at lib/refcount.c:28 refcount_warn_saturate+0x14a/0x210 lib/refcount.c:28 Modules linked in: CPU: 2 UID: 0 PID: 28240 Comm: syz.2.6440 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 RIP: 0010:refcount_warn_saturate+0x14a/0x210 lib/refcount.c:28 Code: ff 89 de e8 48 cb d7 fc 84 db 0f 85 66 ff ff ff e8 5b d0 d7 fc c6 05 59 00 b0 0b 01 90 48 c7 c7 40 9f 15 8c e8 67 73 96 fc 90 <0f> 0b 90 90 e9 43 ff ff ff e8 38 d0 d7 fc 0f b6 1d 34 00 b0 0b 31 RSP: 0018:ffffc900058d78d8 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffc900076bb000 RDX: 0000000000080000 RSI: ffffffff817a4395 RDI: 0000000000000001 RBP: ffff88804250cc78 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff888054d55000 R13: ffff88804250cc78 R14: ffffffff8615a190 R15: ffffffff908e6520 FS: 00007f23579f66c0(0000) GS:ffff8880d68b3000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c2dd6e5 CR3: 00000000293ce000 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/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:1211 hci_conn_hash_flush+0x186/0x260 net/bluetooth/hci_conn.c:2600 hci_dev_close_sync+0x602/0x11d0 net/bluetooth/hci_sync.c:5294 hci_dev_do_close+0x2e/0x90 net/bluetooth/hci_core.c:501 hci_dev_close+0x185/0x1e0 net/bluetooth/hci_core.c:526 hci_sock_ioctl+0x2b3/0x7d0 net/bluetooth/hci_sock.c:1135 sock_do_ioctl+0x115/0x280 net/socket.c:1238 sock_ioctl+0x227/0x6b0 net/socket.c:1359 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:598 [inline] __se_sys_ioctl fs/ioctl.c:584 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4e0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f235978eba9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f23579f6038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f23599d5fa0 RCX: 00007f235978eba9 RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000005 RBP: 00007f2359811e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f23599d6038 R14: 00007f23599d5fa0 R15: 00007fffaf8daa08