[v6.1] possible deadlock in rfcomm_dlc_close

12 views
Skip to first unread message

syzbot

unread,
Sep 10, 2026, 5:59:25 AMSep 10
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: cf82dcca9634 Linux 6.1.187
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13aab749580000
kernel config: https://syzkaller.appspot.com/x/.config?x=872c04466179833f
dashboard link: https://syzkaller.appspot.com/bug?extid=3a1f869dcd8f26e5c216
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
userspace arch: arm64

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/425a730ba33a/disk-cf82dcca.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/7dd95cb647d8/vmlinux-cf82dcca.xz
kernel image: https://storage.googleapis.com/syzbot-assets/1b21aedea13f/Image-cf82dcca.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+3a1f86...@syzkaller.appspotmail.com

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.4.22/4464 is trying to acquire lock:
ffff800017b9ce88 (rfcomm_mutex){+.+.}-{3:3}, at: rfcomm_dlc_close+0x44/0x198 net/bluetooth/rfcomm/core.c:507

but task is already holding lock:
ffff0000d1694130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1805 [inline]
ffff0000d1694130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_close net/bluetooth/rfcomm/sock.c:246 [inline]
ffff0000d1694130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_cleanup_listen net/bluetooth/rfcomm/sock.c:191 [inline]
ffff0000d1694130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: __rfcomm_sock_close+0xe0/0x2f0 net/bluetooth/rfcomm/sock.c:225

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}:
lock_sock_nested+0x70/0x130 net/core/sock.c:3504
lock_sock include/net/sock.h:1805 [inline]
rfcomm_connect_ind+0x49c/0xb6c net/bluetooth/rfcomm/sock.c:966
rfcomm_recv_pn net/bluetooth/rfcomm/core.c:1504 [inline]
rfcomm_recv_mcc net/bluetooth/rfcomm/core.c:1722 [inline]
rfcomm_recv_frame net/bluetooth/rfcomm/core.c:1855 [inline]
rfcomm_process_rx net/bluetooth/rfcomm/core.c:2007 [inline]
rfcomm_process_sessions net/bluetooth/rfcomm/core.c:2100 [inline]
rfcomm_run+0x2290/0x4b50 net/bluetooth/rfcomm/core.c:2188
kthread+0x254/0x2e0 kernel/kthread.c:376
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:850

-> #0 (rfcomm_mutex){+.+.}-{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:5676
__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
rfcomm_dlc_close+0x44/0x198 net/bluetooth/rfcomm/core.c:507
__rfcomm_sock_close+0x1c0/0x2f0 net/bluetooth/rfcomm/sock.c:232
rfcomm_sock_close net/bluetooth/rfcomm/sock.c:247 [inline]
rfcomm_sock_cleanup_listen net/bluetooth/rfcomm/sock.c:191 [inline]
__rfcomm_sock_close+0xe8/0x2f0 net/bluetooth/rfcomm/sock.c:225
rfcomm_sock_shutdown+0xa8/0x210 net/bluetooth/rfcomm/sock.c:918
rfcomm_sock_release+0x58/0x118 net/bluetooth/rfcomm/sock.c:939
__sock_release net/socket.c:654 [inline]
sock_close+0xac/0x1ec net/socket.c:1400
__fput+0x1b4/0x7b0 fs/file_table.c:320
____fput+0x20/0x30 fs/file_table.c:348
task_work_run+0x1f4/0x280 kernel/task_work.c:203
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
do_notify_resume+0x20f8/0x2c84 arch/arm64/kernel/signal.c:1151
prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline]
el0_svc+0x98/0x128 arch/arm64/kernel/entry-common.c:638
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_RFCOMM);
lock(rfcomm_mutex);
lock(sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM);
lock(rfcomm_mutex);

*** DEADLOCK ***

2 locks held by syz.4.22/4464:
#0: ffff0000dfeaa010 (&sb->s_type->i_mutex_key#12){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:764 [inline]
#0: ffff0000dfeaa010 (&sb->s_type->i_mutex_key#12){+.+.}-{3:3}, at: __sock_release net/socket.c:653 [inline]
#0: ffff0000dfeaa010 (&sb->s_type->i_mutex_key#12){+.+.}-{3:3}, at: sock_close+0x74/0x1ec net/socket.c:1400
#1: ffff0000d1694130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1805 [inline]
#1: ffff0000d1694130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_close net/bluetooth/rfcomm/sock.c:246 [inline]
#1: ffff0000d1694130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_cleanup_listen net/bluetooth/rfcomm/sock.c:191 [inline]
#1: ffff0000d1694130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: __rfcomm_sock_close+0xe0/0x2f0 net/bluetooth/rfcomm/sock.c:225

stack backtrace:
CPU: 1 PID: 4464 Comm: syz.4.22 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/07/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:5676
__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
rfcomm_dlc_close+0x44/0x198 net/bluetooth/rfcomm/core.c:507
__rfcomm_sock_close+0x1c0/0x2f0 net/bluetooth/rfcomm/sock.c:232
rfcomm_sock_close net/bluetooth/rfcomm/sock.c:247 [inline]
rfcomm_sock_cleanup_listen net/bluetooth/rfcomm/sock.c:191 [inline]
__rfcomm_sock_close+0xe8/0x2f0 net/bluetooth/rfcomm/sock.c:225
rfcomm_sock_shutdown+0xa8/0x210 net/bluetooth/rfcomm/sock.c:918
rfcomm_sock_release+0x58/0x118 net/bluetooth/rfcomm/sock.c:939
__sock_release net/socket.c:654 [inline]
sock_close+0xac/0x1ec net/socket.c:1400
__fput+0x1b4/0x7b0 fs/file_table.c:320
____fput+0x20/0x30 fs/file_table.c:348
task_work_run+0x1f4/0x280 kernel/task_work.c:203
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
do_notify_resume+0x20f8/0x2c84 arch/arm64/kernel/signal.c:1151
prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline]
el0_svc+0x98/0x128 arch/arm64/kernel/entry-common.c:638
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Sep 11, 2026, 12:14:29 AMSep 11
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: cf82dcca9634 Linux 6.1.187
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1733fe01580000
kernel config: https://syzkaller.appspot.com/x/.config?x=31dfefc4a14efea3
dashboard link: https://syzkaller.appspot.com/bug?extid=3a1f869dcd8f26e5c216
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11bc8905580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14b3fe01580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/97e1e40b968b/disk-cf82dcca.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/cfec27562c15/vmlinux-cf82dcca.xz
kernel image: https://storage.googleapis.com/syzbot-assets/4c7cd066c46d/bzImage-cf82dcca.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+3a1f86...@syzkaller.appspotmail.com

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.0.25/4431 is trying to acquire lock:
ffffffff8dedcb88 (rfcomm_mutex){+.+.}-{3:3}, at: rfcomm_dlc_close+0x35/0x180 net/bluetooth/rfcomm/core.c:507

but task is already holding lock:
ffff88805bfac130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1805 [inline]
ffff88805bfac130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_close net/bluetooth/rfcomm/sock.c:246 [inline]
ffff88805bfac130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_cleanup_listen net/bluetooth/rfcomm/sock.c:191 [inline]
ffff88805bfac130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: __rfcomm_sock_close+0xd5/0x2b0 net/bluetooth/rfcomm/sock.c:225

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}:
lock_sock_nested+0x44/0x100 net/core/sock.c:3504
lock_sock include/net/sock.h:1805 [inline]
rfcomm_connect_ind+0x4ec/0xd80 net/bluetooth/rfcomm/sock.c:966
rfcomm_recv_pn net/bluetooth/rfcomm/core.c:1504 [inline]
rfcomm_recv_mcc net/bluetooth/rfcomm/core.c:1722 [inline]
rfcomm_recv_frame net/bluetooth/rfcomm/core.c:1855 [inline]
rfcomm_process_rx net/bluetooth/rfcomm/core.c:2007 [inline]
rfcomm_process_sessions net/bluetooth/rfcomm/core.c:2100 [inline]
rfcomm_run+0x2ac7/0x5d70 net/bluetooth/rfcomm/core.c:2188
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

-> #0 (rfcomm_mutex){+.+.}-{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+0x2d18/0x7c40 kernel/locking/lockdep.c:5063
lock_acquire+0x1bb/0x4a0 kernel/locking/lockdep.c:5676
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x12d/0xae0 kernel/locking/mutex.c:747
rfcomm_dlc_close+0x35/0x180 net/bluetooth/rfcomm/core.c:507
__rfcomm_sock_close+0x18a/0x2b0 net/bluetooth/rfcomm/sock.c:232
rfcomm_sock_close net/bluetooth/rfcomm/sock.c:247 [inline]
rfcomm_sock_cleanup_listen net/bluetooth/rfcomm/sock.c:191 [inline]
__rfcomm_sock_close+0xdd/0x2b0 net/bluetooth/rfcomm/sock.c:225
rfcomm_sock_shutdown+0xb5/0x240 net/bluetooth/rfcomm/sock.c:918
rfcomm_sock_release+0x55/0x110 net/bluetooth/rfcomm/sock.c:939
__sock_release net/socket.c:654 [inline]
sock_close+0xbf/0x210 net/socket.c:1400
__fput+0x20a/0x8b0 fs/file_table.c:320
task_work_run+0x1d0/0x260 kernel/task_work.c:203
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177
exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303
do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x68/0xd2

other info that might help us debug this:

Possible unsafe locking scenario:

CPU0 CPU1
---- ----
lock(sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM);
lock(rfcomm_mutex);
lock(sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM);
lock(rfcomm_mutex);

*** DEADLOCK ***

2 locks held by syz.0.25/4431:
#0: ffff88805ae20e10 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:764 [inline]
#0: ffff88805ae20e10 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: __sock_release net/socket.c:653 [inline]
#0: ffff88805ae20e10 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: sock_close+0x82/0x210 net/socket.c:1400
#1: ffff88805bfac130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1805 [inline]
#1: ffff88805bfac130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_close net/bluetooth/rfcomm/sock.c:246 [inline]
#1: ffff88805bfac130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_cleanup_listen net/bluetooth/rfcomm/sock.c:191 [inline]
#1: ffff88805bfac130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: __rfcomm_sock_close+0xd5/0x2b0 net/bluetooth/rfcomm/sock.c:225

stack backtrace:
CPU: 0 PID: 4431 Comm: syz.0.25 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
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:5676
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x12d/0xae0 kernel/locking/mutex.c:747
rfcomm_dlc_close+0x35/0x180 net/bluetooth/rfcomm/core.c:507
__rfcomm_sock_close+0x18a/0x2b0 net/bluetooth/rfcomm/sock.c:232
rfcomm_sock_close net/bluetooth/rfcomm/sock.c:247 [inline]
rfcomm_sock_cleanup_listen net/bluetooth/rfcomm/sock.c:191 [inline]
__rfcomm_sock_close+0xdd/0x2b0 net/bluetooth/rfcomm/sock.c:225
rfcomm_sock_shutdown+0xb5/0x240 net/bluetooth/rfcomm/sock.c:918
rfcomm_sock_release+0x55/0x110 net/bluetooth/rfcomm/sock.c:939
__sock_release net/socket.c:654 [inline]
sock_close+0xbf/0x210 net/socket.c:1400
__fput+0x20a/0x8b0 fs/file_table.c:320
task_work_run+0x1d0/0x260 kernel/task_work.c:203
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177
exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303
do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f6076d9e159
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc05976fa8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007ffc05977090 RCX: 00007f6076d9e159
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 0000000000018668 R08: 0000000000000001 R09: 0000000000000000
R10: 0000001b2d920000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f6077025fac R14: 00007f6077025fa8 R15: 00007f6077025fa0
</TASK>


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

syzbot

unread,
Sep 15, 2026, 3:55:26 PMSep 15
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 79643295eba1 Linux 6.6.157
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15106115580000
kernel config: https://syzkaller.appspot.com/x/.config?x=7be9809cedd6b69c
dashboard link: https://syzkaller.appspot.com/bug?extid=1c517b5ba3ebfe65599a
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/a1af8d16581c/disk-79643295.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/66be9bddb1ec/vmlinux-79643295.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0329b316645d/bzImage-79643295.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+1c517b...@syzkaller.appspotmail.com

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.7.783/9017 is trying to acquire lock:
ffffffff8e562248 (rfcomm_mutex){+.+.}-{3:3}, at: rfcomm_dlc_close+0x39/0x180 net/bluetooth/rfcomm/core.c:511

but task is already holding lock:
ffff8880220aa130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1780 [inline]
ffff8880220aa130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_close net/bluetooth/rfcomm/sock.c:246 [inline]
ffff8880220aa130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_cleanup_listen net/bluetooth/rfcomm/sock.c:191 [inline]
ffff8880220aa130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: __rfcomm_sock_close+0xe8/0x2d0 net/bluetooth/rfcomm/sock.c:225

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}:
lock_sock_nested+0x48/0x100 net/core/sock.c:3543
lock_sock include/net/sock.h:1780 [inline]
rfcomm_connect_ind+0x4f0/0xd90 net/bluetooth/rfcomm/sock.c:966
rfcomm_recv_pn net/bluetooth/rfcomm/core.c:1512 [inline]
rfcomm_recv_mcc net/bluetooth/rfcomm/core.c:1730 [inline]
rfcomm_recv_frame net/bluetooth/rfcomm/core.c:1863 [inline]
rfcomm_process_rx net/bluetooth/rfcomm/core.c:2015 [inline]
rfcomm_process_sessions net/bluetooth/rfcomm/core.c:2108 [inline]
rfcomm_run+0x2ba9/0x5e50 net/bluetooth/rfcomm/core.c:2196
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

-> #0 (rfcomm_mutex){+.+.}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3134 [inline]
check_prevs_add kernel/locking/lockdep.c:3253 [inline]
validate_chain kernel/locking/lockdep.c:3869 [inline]
__lock_acquire+0x37ef/0x7d80 kernel/locking/lockdep.c:5137
lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5756
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x135/0xc80 kernel/locking/mutex.c:747
rfcomm_dlc_close+0x39/0x180 net/bluetooth/rfcomm/core.c:511
__rfcomm_sock_close+0x1a4/0x2d0 net/bluetooth/rfcomm/sock.c:232
rfcomm_sock_close net/bluetooth/rfcomm/sock.c:247 [inline]
rfcomm_sock_cleanup_listen net/bluetooth/rfcomm/sock.c:191 [inline]
__rfcomm_sock_close+0xf0/0x2d0 net/bluetooth/rfcomm/sock.c:225
rfcomm_sock_shutdown+0xb9/0x240 net/bluetooth/rfcomm/sock.c:918
rfcomm_sock_release+0x59/0x120 net/bluetooth/rfcomm/sock.c:939
__sock_release net/socket.c:659 [inline]
sock_close+0xa7/0x210 net/socket.c:1421
__fput+0x221/0x940 fs/file_table.c:418
task_work_run+0x1d4/0x260 kernel/task_work.c:245
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:180
exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:213
__syscall_exit_to_user_mode_work kernel/entry/common.c:294 [inline]
syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:305
do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x68/0xd2

other info that might help us debug this:

Possible unsafe locking scenario:

CPU0 CPU1
---- ----
lock(sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM);
lock(rfcomm_mutex);
lock(sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM);
lock(rfcomm_mutex);

*** DEADLOCK ***

2 locks held by syz.7.783/9017:
#0: ffff888054c82620 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:804 [inline]
#0: ffff888054c82620 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: __sock_release net/socket.c:658 [inline]
#0: ffff888054c82620 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: sock_close+0x82/0x210 net/socket.c:1421
#1: ffff8880220aa130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1780 [inline]
#1: ffff8880220aa130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_close net/bluetooth/rfcomm/sock.c:246 [inline]
#1: ffff8880220aa130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_cleanup_listen net/bluetooth/rfcomm/sock.c:191 [inline]
#1: ffff8880220aa130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: __rfcomm_sock_close+0xe8/0x2d0 net/bluetooth/rfcomm/sock.c:225

stack backtrace:
CPU: 0 PID: 9017 Comm: syz.7.783 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
<TASK>
dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
check_noncircular+0x2fc/0x400 kernel/locking/lockdep.c:2187
check_prev_add kernel/locking/lockdep.c:3134 [inline]
check_prevs_add kernel/locking/lockdep.c:3253 [inline]
validate_chain kernel/locking/lockdep.c:3869 [inline]
__lock_acquire+0x37ef/0x7d80 kernel/locking/lockdep.c:5137
lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5756
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x135/0xc80 kernel/locking/mutex.c:747
rfcomm_dlc_close+0x39/0x180 net/bluetooth/rfcomm/core.c:511
__rfcomm_sock_close+0x1a4/0x2d0 net/bluetooth/rfcomm/sock.c:232
rfcomm_sock_close net/bluetooth/rfcomm/sock.c:247 [inline]
rfcomm_sock_cleanup_listen net/bluetooth/rfcomm/sock.c:191 [inline]
__rfcomm_sock_close+0xf0/0x2d0 net/bluetooth/rfcomm/sock.c:225
rfcomm_sock_shutdown+0xb9/0x240 net/bluetooth/rfcomm/sock.c:918
rfcomm_sock_release+0x59/0x120 net/bluetooth/rfcomm/sock.c:939
__sock_release net/socket.c:659 [inline]
sock_close+0xa7/0x210 net/socket.c:1421
__fput+0x221/0x940 fs/file_table.c:418
task_work_run+0x1d4/0x260 kernel/task_work.c:245
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:180
exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:213
__syscall_exit_to_user_mode_work kernel/entry/common.c:294 [inline]
syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:305
do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fdc3e99e159
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff1408ff98 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007fff14090080 RCX: 00007fdc3e99e159
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 000000000002eed0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000001b31a20000 R11: 0000000000000246 R12: 00007fff140900c0
R13: 00007fdc3ec25fac R14: 000000000002ef50 R15: 00007fdc3ec25fa0
</TASK>

syzbot

unread,
Sep 19, 2026, 1:58:31 PMSep 19
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 79643295eba1 Linux 6.6.157
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=11845915580000
kernel config: https://syzkaller.appspot.com/x/.config?x=7be9809cedd6b69c
dashboard link: https://syzkaller.appspot.com/bug?extid=1c517b5ba3ebfe65599a
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15c96ff9580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14eda525580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/a1af8d16581c/disk-79643295.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/66be9bddb1ec/vmlinux-79643295.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0329b316645d/bzImage-79643295.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+1c517b...@syzkaller.appspotmail.com

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.0.20/5939 is trying to acquire lock:
ffffffff8e562248 (rfcomm_mutex){+.+.}-{3:3}, at: rfcomm_dlc_close+0x39/0x180 net/bluetooth/rfcomm/core.c:511

but task is already holding lock:
ffff88802d91d130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1780 [inline]
ffff88802d91d130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_close net/bluetooth/rfcomm/sock.c:246 [inline]
ffff88802d91d130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_cleanup_listen net/bluetooth/rfcomm/sock.c:191 [inline]
ffff88802d91d130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: __rfcomm_sock_close+0xe8/0x2d0 net/bluetooth/rfcomm/sock.c:225
2 locks held by syz.0.20/5939:
#0: ffff88805fc7ca20 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:804 [inline]
#0: ffff88805fc7ca20 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: __sock_release net/socket.c:658 [inline]
#0: ffff88805fc7ca20 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: sock_close+0x82/0x210 net/socket.c:1421
#1: ffff88802d91d130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1780 [inline]
#1: ffff88802d91d130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_close net/bluetooth/rfcomm/sock.c:246 [inline]
#1: ffff88802d91d130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: rfcomm_sock_cleanup_listen net/bluetooth/rfcomm/sock.c:191 [inline]
#1: ffff88802d91d130 (sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM){+.+.}-{0:0}, at: __rfcomm_sock_close+0xe8/0x2d0 net/bluetooth/rfcomm/sock.c:225

stack backtrace:
CPU: 1 PID: 5939 Comm: syz.0.20 Not tainted syzkaller #0
RIP: 0033:0x7fd754f9e159
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffccb183f68 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007ffccb184050 RCX: 00007fd754f9e159
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 0000000000018846 R08: 0000000000000001 R09: 0000000000000000
R10: 0000001b2c520000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fd755225fac R14: 00007fd755225fa8 R15: 00007fd755225fa0
Reply all
Reply to author
Forward
0 new messages