program: syz_init_net_socket$nl_generic(0x10, 0x3, 0x10) prctl$PR_SET_MM_MAP(0x23, 0xe, &(0x7f0000000080)={&(0x7f0000ff0000/0x1000)=nil, &(0x7f0000ff0000/0x10000)=nil, &(0x7f0000ffc000/0x4000)=nil, &(0x7f0000fff000/0x1000)=nil, &(0x7f0000ff8000/0x4000)=nil, &(0x7f0000ff8000/0x3000)=nil, &(0x7f0000ffb000/0x3000)=nil, &(0x7f0000ff9000/0x3000)=nil, &(0x7f0000ffc000/0x3000)=nil, &(0x7f0000ffa000/0x1000)=nil, &(0x7f0000ffa000/0x2000)=nil, 0x0}, 0x68) sendmsg$NFT_BATCH(0xffffffffffffffff, &(0x7f0000000080)={0x0, 0x0, 0x0}, 0x0) r0 = io_uring_setup(0x7, &(0x7f0000000040)={0x0, 0xc8a2, 0xc000, 0x4, 0x28e}) r1 = syz_open_dev$tty1(0xc, 0x4, 0x1) ioctl$KDSETLED(r1, 0x4b32, 0x6) r2 = syz_init_net_socket$bt_l2cap(0x1f, 0x2, 0x0) connect$bt_l2cap(r2, &(0x7f0000000080)={0x1f, 0x0, @fixed={'\xaa\xaa\xaa\xaa\xaa', 0x10}, 0x7ff}, 0xe) r3 = syz_init_net_socket$bt_hidp(0x1f, 0x3, 0x6) ioctl$sock_bt_hidp_HIDPCONNADD(r3, 0x400448c8, &(0x7f00000000c0)={r2, r2, 0x206, 0x0, 0x0, 0x2, 0x72, 0x1, 0x3, 0x7, 0x0, 0x8, 'syz1\x00'}) r4 = syz_init_net_socket$bt_hci(0x1f, 0x3, 0x1) ioctl$HCIINQUIRY(r4, 0x400448ca, 0x0) r5 = bpf$BPF_PROG_RAW_TRACEPOINT_LOAD(0x5, &(0x7f00000023c0)={0x6, 0x4, &(0x7f0000002180)=ANY=[@ANYBLOB="181b00bf2200000000000095"], &(0x7f0000000040)='syzkaller\x00', 0x0, 0x0, 0x0, 0x41100}, 0x94) r6 = socket$inet_icmp_raw(0x2, 0x3, 0x1) ioctl$sock_SIOCGIFINDEX(r6, 0x8933, &(0x7f0000000100)={'netdevsim0\x00', 0x0}) r8 = bpf$BPF_LINK_CREATE_XDP(0x1c, &(0x7f0000000000)={r5, r7, 0x25, 0x14, @val=@iter={&(0x7f0000000180)=@task, 0x10}}, 0x20) r9 = bpf$BPF_PROG_RAW_TRACEPOINT_LOAD(0x5, &(0x7f00000023c0)={0x6, 0x5, &(0x7f00000001c0)=ANY=[@ANYBLOB="180200000000000000000000000000001800000008000000000000006e14000095"], &(0x7f0000000040)='syzkaller\x00', 0x0, 0x0, 0x0, 0x41100}, 0x94) bpf$BPF_LINK_UPDATE(0x1d, &(0x7f0000000140)={r8, r9}, 0x5) syz_open_dev$vbi(&(0x7f0000000000), 0x0, 0x2) socket$inet_icmp_raw(0x2, 0x3, 0x1) r10 = socket$nl_xfrm(0x10, 0x3, 0x6) sendmsg$nl_xfrm(r10, &(0x7f0000000000)={0x0, 0x0, &(0x7f0000000040)={0x0}, 0x1, 0x0, 0x0, 0x4040000}, 0x0) r11 = socket$inet6_tcp(0xa, 0x1, 0x0) bind$inet6(r11, &(0x7f0000000040)={0xa, 0x5e22, 0xffffffff, @empty}, 0x1c) socket$inet6_tcp(0xa, 0x1, 0x0) socket$inet_tcp(0x2, 0x1, 0x0) socket$key(0xf, 0x3, 0x2) socket$inet6_sctp(0xa, 0x1, 0x84) pipe(&(0x7f0000000000)) io_uring_enter(r0, 0x2219, 0xcf74, 0x16, 0x0, 0x0) [ 85.714946][ T4682] Bluetooth: hci0: command tx timeout [ 85.821021][ T5344] input: Bluetooth HID Boot Protocol Device as /devices/virtual/bluetooth/hci0/hci0:200/input5 [ 85.918074][ T5344] Zero length message leads to an empty skb [ 85.959362][ T5345] [ 85.960509][ T5345] ====================================================== [ 85.963557][ T5345] WARNING: possible circular locking dependency detected [ 85.966633][ T5345] syzkaller #0 Not tainted [ 85.968540][ T5345] ------------------------------------------------------ [ 85.971524][ T5345] syz.0.0/5345 is trying to acquire lock: [ 85.973929][ T5345] ffff88801185d840 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0xd2/0xbc0 [ 85.979326][ T5345] [ 85.979326][ T5345] but task is already holding lock: [ 85.982556][ T5345] ffff88801185db38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5b0 [ 85.986531][ T5345] [ 85.986531][ T5345] which lock already depends on the new lock. [ 85.986531][ T5345] [ 85.991122][ T5345] [ 85.991122][ T5345] the existing dependency chain (in reverse order) is: [ 85.994909][ T5345] [ 85.994909][ T5345] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 85.998063][ T5345] __mutex_lock+0x187/0x1350 [ 86.000391][ T5345] l2cap_info_timeout+0x60/0xa0 [ 86.002676][ T5345] process_scheduled_works+0xad1/0x1770 [ 86.005189][ T5345] worker_thread+0x8a0/0xda0 [ 86.007643][ T5345] kthread+0x711/0x8a0 [ 86.010268][ T5345] ret_from_fork+0x510/0xa50 [ 86.013270][ T5345] ret_from_fork_asm+0x1a/0x30 [ 86.016475][ T5345] [ 86.016475][ T5345] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 86.020811][ T5345] __lock_acquire+0x15a6/0x2cf0 [ 86.023021][ T5345] lock_acquire+0x107/0x340 [ 86.025015][ T5345] __flush_work+0x6b8/0xbc0 [ 86.026922][ T5345] __cancel_work_sync+0xbe/0x110 [ 86.028874][ T5345] l2cap_conn_del+0x402/0x5b0 [ 86.031085][ T5345] hci_conn_hash_flush+0x10d/0x260 [ 86.033214][ T5345] hci_dev_close_sync+0x821/0x1100 [ 86.035330][ T5345] hci_dev_close+0x108/0x270 [ 86.037703][ T5345] sock_do_ioctl+0xdc/0x300 [ 86.040145][ T5345] sock_ioctl+0x576/0x790 [ 86.041886][ T5345] __se_sys_ioctl+0xfc/0x170 [ 86.043800][ T5345] do_syscall_64+0xec/0xf80 [ 86.045817][ T5345] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.048670][ T5345] [ 86.048670][ T5345] other info that might help us debug this: [ 86.048670][ T5345] [ 86.053121][ T5345] Possible unsafe locking scenario: [ 86.053121][ T5345] [ 86.056436][ T5345] CPU0 CPU1 [ 86.058761][ T5345] ---- ---- [ 86.061118][ T5345] lock(&conn->lock#2); [ 86.063083][ T5345] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.067112][ T5345] lock(&conn->lock#2); [ 86.069922][ T5345] lock((work_completion)(&(&conn->info_timer)->work)); [ 86.072963][ T5345] [ 86.072963][ T5345] *** DEADLOCK *** [ 86.072963][ T5345] [ 86.076497][ T5345] 5 locks held by syz.0.0/5345: [ 86.078614][ T5345] #0: ffff88801a12cec0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_dev_close+0x100/0x270 [ 86.082823][ T5345] #1: ffff88801a12c0c0 (&hdev->lock){+.+.}-{4:4}, at: hci_dev_close_sync+0x640/0x1100 [ 86.086813][ T5345] #2: ffffffff8f485c88 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_hash_flush+0xa1/0x260 [ 86.090894][ T5345] #3: ffff88801185db38 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5b0 [ 86.094314][ T5345] #4: ffffffff8df41aa0 (rcu_read_lock){....}-{1:3}, at: __flush_work+0xd2/0xbc0 [ 86.098172][ T5345] [ 86.098172][ T5345] stack backtrace: [ 86.100822][ T5345] CPU: 0 UID: 0 PID: 5345 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 86.100839][ T5345] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 [ 86.100847][ T5345] Call Trace: [ 86.100854][ T5345] [ 86.100861][ T5345] dump_stack_lvl+0xe8/0x150 [ 86.100879][ T5345] print_circular_bug+0x2e2/0x300 [ 86.100894][ T5345] check_noncircular+0x12e/0x150 [ 86.100907][ T5345] __lock_acquire+0x15a6/0x2cf0 [ 86.100920][ T5345] ? do_raw_spin_lock+0x121/0x290 [ 86.100936][ T5345] ? __flush_work+0xd2/0xbc0 [ 86.100947][ T5345] lock_acquire+0x107/0x340 [ 86.100957][ T5345] ? __flush_work+0xd2/0xbc0 [ 86.100971][ T5345] ? __flush_work+0xd2/0xbc0 [ 86.100981][ T5345] __flush_work+0x6b8/0xbc0 [ 86.100992][ T5345] ? __flush_work+0xd2/0xbc0 [ 86.101003][ T5345] ? __flush_work+0xd2/0xbc0 [ 86.101014][ T5345] ? __pfx___flush_work+0x10/0x10 [ 86.101026][ T5345] ? __pfx_wq_barrier_func+0x10/0x10 [ 86.101039][ T5345] ? __cancel_work_sync+0x5c/0x110 [ 86.101051][ T5345] __cancel_work_sync+0xbe/0x110 [ 86.101063][ T5345] l2cap_conn_del+0x402/0x5b0 [ 86.101077][ T5345] ? __pfx_l2cap_disconn_cfm+0x10/0x10 [ 86.101092][ T5345] hci_conn_hash_flush+0x10d/0x260 [ 86.101110][ T5345] hci_dev_close_sync+0x821/0x1100 [ 86.101125][ T5345] ? __pfx_hci_dev_close_sync+0x10/0x10 [ 86.101136][ T5345] ? lockdep_hardirqs_on+0x7b/0x110 [ 86.101146][ T5345] ? enable_work+0x1e9/0x220 [ 86.101160][ T5345] hci_dev_close+0x108/0x270 [ 86.101173][ T5345] sock_do_ioctl+0xdc/0x300 [ 86.101187][ T5345] ? __pfx_sock_do_ioctl+0x10/0x10 [ 86.101199][ T5345] ? do_futex+0x333/0x420 [ 86.101210][ T5345] ? call_rcu+0x644/0x890 [ 86.101226][ T5345] sock_ioctl+0x576/0x790 [ 86.101237][ T5345] ? __pfx_sock_ioctl+0x10/0x10 [ 86.101249][ T5345] ? __fget_files+0x2a/0x420 [ 86.101259][ T5345] ? __fget_files+0x3a0/0x420 [ 86.101269][ T5345] ? __fget_files+0x2a/0x420 [ 86.101279][ T5345] ? bpf_lsm_file_ioctl+0x9/0x20 [ 86.101294][ T5345] ? __pfx_sock_ioctl+0x10/0x10 [ 86.101305][ T5345] __se_sys_ioctl+0xfc/0x170 [ 86.101320][ T5345] do_syscall_64+0xec/0xf80 [ 86.101329][ T5345] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.101339][ T5345] ? trace_irq_disable+0x37/0x100 [ 86.101352][ T5345] ? clear_bhb_loop+0x60/0xb0 [ 86.101363][ T5345] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 86.101374][ T5345] RIP: 0033:0x7fc4b678f7c9 [ 86.101384][ T5345] Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 [ 86.101393][ T5345] RSP: 002b:00007fc4b7555038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 86.101405][ T5345] RAX: ffffffffffffffda RBX: 00007fc4b69e6090 RCX: 00007fc4b678f7c9 [ 86.101413][ T5345] RDX: 0000000000000000 RSI: 00000000400448ca RDI: 0000000000000008 [ 86.101430][ T5345] RBP: 00007fc4b6813f91 R08: 0000000000000000 R09: 0000000000000000 [ 86.101438][ T5345] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 86.101445][ T5345] R13: 00007fc4b69e6128 R14: 00007fc4b69e6090 R15: 00007ffd46a8cbe8 [ 86.101458][ T5345] [ 87.770766][ T4682] Bluetooth: hci0: command tx timeout [ 89.850997][ T4682] Bluetooth: hci0: command tx timeout [ 91.693593][ T1360] cfg80211: failed to load regulatory.db [ 91.930477][ T4682] Bluetooth: hci0: command tx timeout