WARNING: refcount bug in sco_conn_del (3)

Status: moderation: reported on 2024/04/04 13:34
Subsystems: bluetooth
[Documentation on labels]
First crash: 57d, last: 57d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: refcount bug in sco_conn_del (2) bluetooth 1 321d 317d 0/26 auto-obsoleted due to no activity on 2023/09/10 03:31
upstream WARNING: refcount bug in sco_conn_del bluetooth 7 975d 986d 0/26 auto-closed as invalid on 2022/01/23 12:39

Sample crash report:
------------[ cut here ]------------
refcount_t: addition on 0; use-after-free.
WARNING: CPU: 0 PID: 17235 at lib/refcount.c:25 refcount_warn_saturate+0x13a/0x1d0 lib/refcount.c:25
Modules linked in:
CPU: 0 PID: 17235 Comm: syz-executor.4 Not tainted 6.8.0-syzkaller-05271-gf99c5f563c17 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:refcount_warn_saturate+0x13a/0x1d0 lib/refcount.c:25
Code: 80 73 fe 8b e8 77 4a b3 fc 90 0f 0b 90 90 eb b9 e8 5b 71 f0 fc c6 05 9d cf cc 0a 01 90 48 c7 c7 e0 73 fe 8b e8 57 4a b3 fc 90 <0f> 0b 90 90 eb 99 e8 3b 71 f0 fc c6 05 7e cf cc 0a 01 90 48 c7 c7
RSP: 0018:ffffc9000316f7b8 EFLAGS: 00010246
RAX: 114c397da8483600 RBX: ffff88805ff79080 RCX: ffff88805b948000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000002 R08: ffffffff8157cc12 R09: 1ffff9200062de4c
R10: dffffc0000000000 R11: fffff5200062de4d R12: ffff88805ff79000
R13: ffff88802375b200 R14: 1ffff1100c30e1fc R15: ffff888061870fe0
FS:  0000000000000000(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd7466d66e4 CR3: 00000000113ea000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __refcount_inc include/linux/refcount.h:241 [inline]
 refcount_inc include/linux/refcount.h:258 [inline]
 sock_hold include/net/sock.h:774 [inline]
 sco_conn_del+0x260/0x310 net/bluetooth/sco.c:195
 hci_disconn_cfm include/net/bluetooth/hci_core.h:2022 [inline]
 hci_conn_hash_flush+0xff/0x240 net/bluetooth/hci_conn.c:2566
 hci_dev_close_sync+0x9ab/0x1050 net/bluetooth/hci_sync.c:5153
 hci_dev_do_close net/bluetooth/hci_core.c:554 [inline]
 hci_unregister_dev+0x1e3/0x4e0 net/bluetooth/hci_core.c:2773
 vhci_release+0x83/0xd0 drivers/bluetooth/hci_vhci.c:674
 __fput+0x429/0x8a0 fs/file_table.c:423
 task_work_run+0x24f/0x310 kernel/task_work.c:180
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0xa1b/0x27e0 kernel/exit.c:878
 do_group_exit+0x207/0x2c0 kernel/exit.c:1027
 get_signal+0x176e/0x1850 kernel/signal.c:2907
 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310
 exit_to_user_mode_loop kernel/entry/common.c:105 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline]
 syscall_exit_to_user_mode+0xc9/0x360 kernel/entry/common.c:212
 do_syscall_64+0x10a/0x240 arch/x86/entry/common.c:89
RIP: 0033:0x7fe4ffa7f94a
Code: Unable to access opcode bytes at 0x7fe4ffa7f920.
RSP: 002b:00007ffcdf9a8718 EFLAGS: 00000216 ORIG_RAX: 0000000000000037
RAX: 0000000000000000 RBX: 00007ffcdf9a87a0 RCX: 00007fe4ffa7f94a
RDX: 0000000000000041 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000003 R08: 00007ffcdf9a873c R09: 00007ffcdf9a8b57
R10: 00007ffcdf9a87a0 R11: 0000000000000216 R12: 00007fe4ffb7cd00
R13: 00007ffcdf9a873c R14: 0000000000000000 R15: 00007fe4ffb7eec0

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/31 13:32 net f99c5f563c17 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: refcount bug in sco_conn_del
* Struck through repros no longer work on HEAD.