====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.0.507/6400 is trying to acquire lock: ffff0000dbd50428 (&hdev->lock){+.+.}-{3:3}, at: l2cap_chan_connect+0xd0/0xba0 net/bluetooth/l2cap_core.c:7308 but task is already holding lock: ffff800017bc9128 (rfcomm_mutex){+.+.}-{3:3}, at: rfcomm_dlc_open+0xa8/0xcf4 net/bluetooth/rfcomm/core.c:425 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (rfcomm_mutex){+.+.}-{3:3}: __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_security_cfm+0x9c/0x674 net/bluetooth/rfcomm/core.c:2216 hci_encrypt_cfm+0x308/0x444 include/net/bluetooth/hci_core.h:1897 hci_encrypt_change_evt+0x4d0/0xba4 net/bluetooth/hci_event.c:3614 hci_event_func net/bluetooth/hci_event.c:7314 [inline] hci_event_packet+0x698/0xe60 net/bluetooth/hci_event.c:7366 hci_rx_work+0x310/0xa70 net/bluetooth/hci_core.c:4006 process_one_work+0x7e4/0x13bc kernel/workqueue.c:2292 worker_thread+0x8cc/0xfe8 kernel/workqueue.c:2439 kthread+0x254/0x2e0 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:850 -> #1 (hci_cb_list_lock){+.+.}-{3:3}: __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 hci_connect_cfm include/net/bluetooth/hci_core.h:1818 [inline] hci_remote_features_evt+0x410/0x840 net/bluetooth/hci_event.c:3734 hci_event_func net/bluetooth/hci_event.c:7314 [inline] hci_event_packet+0x698/0xe60 net/bluetooth/hci_event.c:7366 hci_rx_work+0x310/0xa70 net/bluetooth/hci_core.c:4006 process_one_work+0x7e4/0x13bc kernel/workqueue.c:2292 worker_thread+0x8cc/0xfe8 kernel/workqueue.c:2439 kthread+0x254/0x2e0 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:850 -> #0 (&hdev->lock){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3504/0x7280 kernel/locking/lockdep.c:5171 lock_acquire+0x210/0x63c kernel/locking/lockdep.c:5790 __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 l2cap_chan_connect+0xd0/0xba0 net/bluetooth/l2cap_core.c:7308 l2cap_sock_connect+0x414/0x600 net/bluetooth/l2cap_sock.c:257 kernel_connect+0x124/0x190 net/socket.c:3555 rfcomm_session_create net/bluetooth/rfcomm/core.c:807 [inline] __rfcomm_dlc_open net/bluetooth/rfcomm/core.c:384 [inline] rfcomm_dlc_open+0x4f4/0xcf4 net/bluetooth/rfcomm/core.c:427 rfcomm_dev_activate+0x64/0xf8 net/bluetooth/rfcomm/tty.c:115 tty_port_open+0x108/0x1e8 drivers/tty/tty_port.c:783 rfcomm_tty_open+0x6c/0x358 net/bluetooth/rfcomm/tty.c:751 tty_open+0x414/0xb5c drivers/tty/tty_io.c:2145 chrdev_open+0x3d0/0x51c fs/char_dev.c:414 do_dentry_open+0x738/0xf8c fs/open.c:882 vfs_open+0x7c/0x90 fs/open.c:1015 do_open fs/namei.c:3677 [inline] path_openat+0x1fc0/0x27a0 fs/namei.c:3834 do_filp_open+0x198/0x38c fs/namei.c:3861 do_sys_openat2+0x134/0x3fc fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_openat fs/open.c:1352 [inline] __se_sys_openat fs/open.c:1347 [inline] __arm64_sys_openat+0x11c/0x150 fs/open.c:1347 __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/0x12c 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: Chain exists of: &hdev->lock --> hci_cb_list_lock --> rfcomm_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rfcomm_mutex); lock(hci_cb_list_lock); lock(rfcomm_mutex); lock(&hdev->lock); *** DEADLOCK *** 3 locks held by syz.0.507/6400: #0: ffff0000db9011c0 (&tty->legacy_mutex){+.+.}-{3:3}, at: tty_lock+0x7c/0xcc drivers/tty/tty_mutex.c:18 #1: ffff0000dd3732a8 (&port->mutex){+.+.}-{3:3}, at: tty_port_open+0x74/0x1e8 drivers/tty/tty_port.c:778 #2: ffff800017bc9128 (rfcomm_mutex){+.+.}-{3:3}, at: rfcomm_dlc_open+0xa8/0xcf4 net/bluetooth/rfcomm/core.c:425 stack backtrace: CPU: 1 PID: 6400 Comm: syz.0.507 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:2088 check_noncircular+0x290/0x370 kernel/locking/lockdep.c:2215 check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3504/0x7280 kernel/locking/lockdep.c:5171 lock_acquire+0x210/0x63c kernel/locking/lockdep.c:5790 __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 l2cap_chan_connect+0xd0/0xba0 net/bluetooth/l2cap_core.c:7308 l2cap_sock_connect+0x414/0x600 net/bluetooth/l2cap_sock.c:257 kernel_connect+0x124/0x190 net/socket.c:3555 rfcomm_session_create net/bluetooth/rfcomm/core.c:807 [inline] __rfcomm_dlc_open net/bluetooth/rfcomm/core.c:384 [inline] rfcomm_dlc_open+0x4f4/0xcf4 net/bluetooth/rfcomm/core.c:427 rfcomm_dev_activate+0x64/0xf8 net/bluetooth/rfcomm/tty.c:115 tty_port_open+0x108/0x1e8 drivers/tty/tty_port.c:783 rfcomm_tty_open+0x6c/0x358 net/bluetooth/rfcomm/tty.c:751 tty_open+0x414/0xb5c drivers/tty/tty_io.c:2145 chrdev_open+0x3d0/0x51c fs/char_dev.c:414 do_dentry_open+0x738/0xf8c fs/open.c:882 vfs_open+0x7c/0x90 fs/open.c:1015 do_open fs/namei.c:3677 [inline] path_openat+0x1fc0/0x27a0 fs/namei.c:3834 do_filp_open+0x198/0x38c fs/namei.c:3861 do_sys_openat2+0x134/0x3fc fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_openat fs/open.c:1352 [inline] __se_sys_openat fs/open.c:1347 [inline] __arm64_sys_openat+0x11c/0x150 fs/open.c:1347 __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/0x12c 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