possible deadlock in iso_connect_cfm

Status: upstream: reported on 2026/09/22 23:21
Reported-by: syzbot+bc168c8ad5c0a5881021@syzkaller.appspotmail.com
First crash: 7d22h, last: 12h56m

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/u5:4/4285 is trying to acquire lock:
ffff88801c6f0130 (sk_lock-AF_BLUETOOTH-BTPROTO_ISO){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1805 [inline]
ffff88801c6f0130 (sk_lock-AF_BLUETOOTH-BTPROTO_ISO){+.+.}-{0:0}, at: iso_conn_ready net/bluetooth/iso.c:1480 [inline]
ffff88801c6f0130 (sk_lock-AF_BLUETOOTH-BTPROTO_ISO){+.+.}-{0:0}, at: iso_connect_cfm+0x673/0x11b0 net/bluetooth/iso.c:1673

but task is already holding lock:
ffffffff8deb3b48 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_connect_cfm include/net/bluetooth/hci_core.h:1818 [inline]
ffffffff8deb3b48 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_cc_le_setup_iso_path+0x1e0/0x540 net/bluetooth/hci_event.c:3886

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (hci_cb_list_lock){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x12d/0xae0 kernel/locking/mutex.c:747
       hci_connect_cfm include/net/bluetooth/hci_core.h:1818 [inline]
       hci_remote_features_evt+0x464/0xa10 net/bluetooth/hci_event.c:3734
       hci_event_func net/bluetooth/hci_event.c:7314 [inline]
       hci_event_packet+0x806/0x1290 net/bluetooth/hci_event.c:7366
       hci_rx_work+0x3eb/0xd40 net/bluetooth/hci_core.c:4006
       process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292
       worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439
       kthread+0x29d/0x330 kernel/kthread.c:376
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

-> #1 (&hdev->lock){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x12d/0xae0 kernel/locking/mutex.c:747
       iso_listen_bis net/bluetooth/iso.c:910 [inline]
       iso_sock_listen+0x495/0x870 net/bluetooth/iso.c:959
       __sys_listen+0x19d/0x220 net/socket.c:1845
       __do_sys_listen net/socket.c:1854 [inline]
       __se_sys_listen net/socket.c:1852 [inline]
       __x64_sys_listen+0x56/0x60 net/socket.c:1852
       do_syscall_x64 arch/x86/entry/common.c:46 [inline]
       do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
       entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> #0 (sk_lock-AF_BLUETOOTH-BTPROTO_ISO){+.+.}-{0:0}:
       check_prev_add kernel/locking/lockdep.c:3095 [inline]
       check_prevs_add kernel/locking/lockdep.c:3214 [inline]
       validate_chain kernel/locking/lockdep.c:3830 [inline]
       __lock_acquire+0x2d18/0x7c40 kernel/locking/lockdep.c:5063
       lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5678
       lock_sock_nested+0x44/0x100 net/core/sock.c:3504
       lock_sock include/net/sock.h:1805 [inline]
       iso_conn_ready net/bluetooth/iso.c:1480 [inline]
       iso_connect_cfm+0x673/0x11b0 net/bluetooth/iso.c:1673
       hci_connect_cfm include/net/bluetooth/hci_core.h:1821 [inline]
       hci_cc_le_setup_iso_path+0x240/0x540 net/bluetooth/hci_event.c:3886
       hci_cc_func net/bluetooth/hci_event.c:4150 [inline]
       hci_cmd_complete_evt+0x4e3/0xa40 net/bluetooth/hci_event.c:4167
       hci_event_func net/bluetooth/hci_event.c:7311 [inline]
       hci_event_packet+0x7b3/0x1290 net/bluetooth/hci_event.c:7366
       hci_rx_work+0x3eb/0xd40 net/bluetooth/hci_core.c:4006
       process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292
       worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439
       kthread+0x29d/0x330 kernel/kthread.c:376
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

other info that might help us debug this:

Chain exists of:
  sk_lock-AF_BLUETOOTH-BTPROTO_ISO --> &hdev->lock --> hci_cb_list_lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(hci_cb_list_lock);
                               lock(&hdev->lock);
                               lock(hci_cb_list_lock);
  lock(sk_lock-AF_BLUETOOTH-BTPROTO_ISO);

 *** DEADLOCK ***

4 locks held by kworker/u5:4/4285:
 #0: ffff88807b29c138 ((wq_completion)hci0#2){+.+.}-{0:0}, at: process_one_work+0x7b4/0x1160 kernel/workqueue.c:2267
 #1: ffffc900043a7d00 ((work_completion)(&hdev->rx_work)){+.+.}-{0:0}, at: process_one_work+0x7b4/0x1160 kernel/workqueue.c:2267
 #2: ffff888079a9c428 (&hdev->lock){+.+.}-{3:3}, at: hci_cc_le_setup_iso_path+0x57/0x540 net/bluetooth/hci_event.c:3862
 #3: ffffffff8deb3b48 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_connect_cfm include/net/bluetooth/hci_core.h:1818 [inline]
 #3: ffffffff8deb3b48 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_cc_le_setup_iso_path+0x1e0/0x540 net/bluetooth/hci_event.c:3886

stack backtrace:
CPU: 1 PID: 4285 Comm: kworker/u5:4 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: hci0 hci_rx_work
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
 check_noncircular+0x296/0x330 kernel/locking/lockdep.c:2170
 check_prev_add kernel/locking/lockdep.c:3095 [inline]
 check_prevs_add kernel/locking/lockdep.c:3214 [inline]
 validate_chain kernel/locking/lockdep.c:3830 [inline]
 __lock_acquire+0x2d18/0x7c40 kernel/locking/lockdep.c:5063
 lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5678
 lock_sock_nested+0x44/0x100 net/core/sock.c:3504
 lock_sock include/net/sock.h:1805 [inline]
 iso_conn_ready net/bluetooth/iso.c:1480 [inline]
 iso_connect_cfm+0x673/0x11b0 net/bluetooth/iso.c:1673
 hci_connect_cfm include/net/bluetooth/hci_core.h:1821 [inline]
 hci_cc_le_setup_iso_path+0x240/0x540 net/bluetooth/hci_event.c:3886
 hci_cc_func net/bluetooth/hci_event.c:4150 [inline]
 hci_cmd_complete_evt+0x4e3/0xa40 net/bluetooth/hci_event.c:4167
 hci_event_func net/bluetooth/hci_event.c:7311 [inline]
 hci_event_packet+0x7b3/0x1290 net/bluetooth/hci_event.c:7366
 hci_rx_work+0x3eb/0xd40 net/bluetooth/hci_core.c:4006
 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
Bluetooth: hci1: command 0x2044 tx timeout

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/30 08:57 linux-6.1.y 1a8763b93150 7808aef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in iso_connect_cfm
2026/09/30 08:54 linux-6.1.y 1a8763b93150 7808aef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in iso_connect_cfm
2026/09/23 14:41 linux-6.1.y 1a8763b93150 abce1216 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in iso_connect_cfm
2026/09/22 23:22 linux-6.1.y 1a8763b93150 5207b90e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in iso_connect_cfm
2026/09/22 23:20 linux-6.1.y 1a8763b93150 5207b90e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in iso_connect_cfm
* Struck through repros no longer work on HEAD.