possible deadlock in iso_sock_listen

Status: upstream: reported on 2026/09/30 15:41
Reported-by: syzbot+5c947f98fd8093cfecad@syzkaller.appspotmail.com
First crash: 17d, last: 17d

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.0.16/4460 is trying to acquire lock:
ffff0000da8b4428 (&hdev->lock){+.+.}-{3:3}, at: iso_listen_bis net/bluetooth/iso.c:910 [inline]
ffff0000da8b4428 (&hdev->lock){+.+.}-{3:3}, at: iso_sock_listen+0x3e0/0x75c net/bluetooth/iso.c:959

but task is already holding lock:
ffff0000c3be2130 (sk_lock-AF_BLUETOOTH-BTPROTO_ISO){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1805 [inline]
ffff0000c3be2130 (sk_lock-AF_BLUETOOTH-BTPROTO_ISO){+.+.}-{0:0}, at: iso_sock_listen+0xb0/0x75c net/bluetooth/iso.c:944

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (sk_lock-AF_BLUETOOTH-BTPROTO_ISO){+.+.}-{0:0}:
       lock_sock_nested+0x70/0x130 net/core/sock.c:3504
       lock_sock include/net/sock.h:1805 [inline]
       iso_connect_cis+0x1f4/0x594 net/bluetooth/iso.c:379
       iso_sock_connect+0x22c/0x438 net/bluetooth/iso.c:868
       __sys_connect_file net/socket.c:2011 [inline]
       __sys_connect+0x28c/0x2b4 net/socket.c:2028
       __do_sys_connect net/socket.c:2038 [inline]
       __se_sys_connect net/socket.c:2035 [inline]
       __arm64_sys_connect+0x7c/0x94 net/socket.c:2035
       __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
       invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
       el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140
       do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204
       el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
       el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
       el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

-> #0 (&hdev->lock){+.+.}-{3:3}:
       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+0x2808/0x6634 kernel/locking/lockdep.c:5063
       lock_acquire+0x20c/0x638 kernel/locking/lockdep.c:5678
       __mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603
       __mutex_lock kernel/locking/mutex.c:747 [inline]
       mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
       iso_listen_bis net/bluetooth/iso.c:910 [inline]
       iso_sock_listen+0x3e0/0x75c net/bluetooth/iso.c:959
       __sys_listen+0x198/0x21c net/socket.c:1845
       __do_sys_listen net/socket.c:1854 [inline]
       __se_sys_listen net/socket.c:1852 [inline]
       __arm64_sys_listen+0x5c/0x74 net/socket.c:1852
       __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
       invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
       el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140
       do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204
       el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
       el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
       el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

other info that might help us debug this:

 Possible unsafe locking scenario:

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

 *** DEADLOCK ***

1 lock held by syz.0.16/4460:
 #0: ffff0000c3be2130 (sk_lock-AF_BLUETOOTH-BTPROTO_ISO){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1805 [inline]
 #0: ffff0000c3be2130 (sk_lock-AF_BLUETOOTH-BTPROTO_ISO){+.+.}-{0:0}, at: iso_sock_listen+0xb0/0x75c net/bluetooth/iso.c:944

stack backtrace:
CPU: 0 PID: 4460 Comm: syz.0.16 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/14/2026
Call trace:
 dump_backtrace+0x1c4/0x1f0 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack+0x30/0x40 lib/dump_stack.c:88
 dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106
 dump_stack+0x1c/0x5c lib/dump_stack.c:113
 print_circular_bug+0x148/0x1b0 kernel/locking/lockdep.c:2048
 check_noncircular+0x264/0x2f8 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+0x2808/0x6634 kernel/locking/lockdep.c:5063
 lock_acquire+0x20c/0x638 kernel/locking/lockdep.c:5678
 __mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
 iso_listen_bis net/bluetooth/iso.c:910 [inline]
 iso_sock_listen+0x3e0/0x75c net/bluetooth/iso.c:959
 __sys_listen+0x198/0x21c net/socket.c:1845
 __do_sys_listen net/socket.c:1854 [inline]
 __se_sys_listen net/socket.c:1852 [inline]
 __arm64_sys_listen+0x5c/0x74 net/socket.c:1852
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140
 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204
 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

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