WARNING in hci_recv_frame
Subsystems (4)
syzbot
syzbotHello,
syzbot found the following issue on:
HEAD commit: 2bd87951de65 Merge git://git.kernel.org/pub/scm/linux/kern.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=1655ccef180000 kernel config: https://syzkaller.appspot.com/x/.config?x=5ced800a6af0f5b0 dashboard link: https://syzkaller.appspot.com/bug?extid=3e07a461b836821ff70e compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/167fa7ed263b/disk-2bd87951.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/d5451b036870/vmlinux-2bd87951.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a0d784e076f2/bzImage-2bd87951.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
------------[ cut here ]------------ WARNING: CPU: 0 PID: 14307 at kernel/workqueue.c:2322 __queue_work+0xc6c/0xef0 kernel/workqueue.c:2321 Modules linked in: CPU: 0 PID: 14307 Comm: syz-executor.2 Not tainted 6.9.0-rc5-syzkaller-01160-g2bd87951de65 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 RIP: 0010:__queue_work+0xc6c/0xef0 kernel/workqueue.c:2321 Code: ff e8 48 38 36 00 90 0f 0b 90 e9 20 fd ff ff e8 3a 38 36 00 eb 13 e8 33 38 36 00 eb 0c e8 2c 38 36 00 eb 05 e8 25 38 36 00 90 <0f> 0b 90 48 83 c4 68 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc RSP: 0018:ffffc900034f78a0 EFLAGS: 00010093 RAX: ffffffff815fc90d RBX: ffff88802a579e00 RCX: ffff88802a579e00 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffffffff815fbdd3 R09: 1ffff1100f64b9ac R10: dffffc0000000000 R11: ffffed100f64b9ad R12: ffff888068ebd9c0 R13: dffffc0000000000 R14: ffff888068ebd800 R15: 0000000000000008 FS: 000055557f1bb480(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f0909aba170 CR3: 0000000079f8e000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> queue_work_on+0x14f/0x250 kernel/workqueue.c:2435 queue_work include/linux/workqueue.h:605 [inline] hci_recv_frame+0x489/0x610 net/bluetooth/hci_core.c:2998 vhci_get_user drivers/bluetooth/hci_vhci.c:521 [inline] vhci_write+0x35a/0x480 drivers/bluetooth/hci_vhci.c:617 do_iter_readv_writev+0x5a4/0x800 vfs_writev+0x395/0xbb0 fs/read_write.c:971 do_writev+0x1b1/0x350 fs/read_write.c:1018 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f0909a7dc9d Code: 28 89 54 24 1c 48 89 74 24 10 89 7c 24 08 e8 0a 70 02 00 8b 54 24 1c 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 14 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 33 44 89 c7 48 89 44 24 08 e8 5e 70 02 00 48 RSP: 002b:00007fffb04b4630 EFLAGS: 00000293 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f0909a7dc9d RDX: 0000000000000003 RSI: 00007fffb04b4670 RDI: 00000000000000ca RBP: 000055557f1bb430 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000008 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f0909bac9d8 R15: 000000000000000c </TASK>
---
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 [email protected].
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
syzbotsyzbot has found a reproducer for the following issue on:
syzbot has found a reproducer for the following issue on:
HEAD commit: a5c93bfec0be Merge tag 'x86-mm-2024-11-18' of git://git.ke.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1378475f980000 kernel config: https://syzkaller.appspot.com/x/.config?x=9b5cb37a5a4eda10 dashboard link: https://syzkaller.appspot.com/bug?extid=3e07a461b836821ff70e compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12694ae8580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/70daf24cbd5f/disk-a5c93bfe.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/43d73b55bde3/vmlinux-a5c93bfe.xz
kernel image: https://storage.googleapis.com/syzbot-assets/1742639611a8/bzImage-a5c93bfe.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Bluetooth: hci0: Opcode 0x0c03 failed: -112
------------[ cut here ]------------ WARNING: CPU: 1 PID: 11474 at kernel/workqueue.c:2257 __queue_work+0xc3a/0x1080 kernel/workqueue.c:2256 Modules linked in: CPU: 1 UID: 0 PID: 11474 Comm: syz.3.1469 Not tainted 6.12.0-syzkaller-01518-ga5c93bfec0be #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 RIP: 0010:__queue_work+0xc3a/0x1080 kernel/workqueue.c:2256 Code: 07 83 c0 03 38 d0 7c 09 84 d2 74 05 e8 8f 55 98 00 8b 5b 2c 31 ff 83 e3 20 89 de e8 70 79 36 00 85 db 75 60 e8 27 77 36 00 90 <0f> 0b 90 e9 f9 f7 ff ff e8 19 77 36 00 90 0f 0b 90 e9 a8 f7 ff ff RSP: 0018:ffffc9000b2b7bf8 EFLAGS: 00010093 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff815719b0 RDX: ffff88802b422440 RSI: ffffffff815719b9 RDI: 0000000000000005 RBP: ffff8880360a8a80 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000008 R14: ffff8880123d3000 R15: ffff8880123d3000 FS: 00007f22bc8606c0(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f38a17baf98 CR3: 000000006114e000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> queue_work_on+0x11a/0x140 kernel/workqueue.c:2390 queue_work include/linux/workqueue.h:662 [inline] hci_recv_frame+0x23f/0x7e0 net/bluetooth/hci_core.c:2946 vhci_get_user drivers/bluetooth/hci_vhci.c:511 [inline] vhci_write+0x385/0x470 drivers/bluetooth/hci_vhci.c:607 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:679 ksys_write+0x12b/0x250 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f22bb97d23f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 c9 8d 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 1c 8e 02 00 48 RSP: 002b:00007f22bc860000 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f22bbb35f80 RCX: 00007f22bb97d23f RDX: 0000000000000007 RSI: 0000000020000000 RDI: 00000000000000ca RBP: 00007f22bb9f175e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000000 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f22bbb35f80 R15: 00007ffc1b246d58 </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.
On Wed, 20 Nov 2024 01:18:22 -0800
Quoted 5 lines
syzbot has found a reproducer for the following issue on:
HEAD commit: a5c93bfec0be Merge tag 'x86-mm-2024-11-18' of git://git.ke.. git tree: upstream syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12694ae8580000
#syz test upstream master
net/bluetooth/hci_core.c +10 -2
@@ -2901,12 +2901,18 @@ int hci_recv_frame(struct hci_dev *hdev, {u8 dev_pkt_type; -if (!hdev || (!test_bit (HCI_UP , &hdev->flags) - && !test_bit (HCI_INIT , &hdev->flags))) { +if (!hdev || !test_bit (HCI_UP , &hdev->flags)) { +out:kfree_skb (skb);return -ENXIO ; } +hci_req_sync_lock (hdev); +if (!test_bit (HCI_UP , &hdev->flags)) { +hci_req_sync_unlock (hdev); + goto out; + } +/* Check if the driver agree with packet type classification */ dev_pkt_type =hci_dev_classify_pkt_type (hdev, skb);if (hci_skb_pkt_type (skb) != dev_pkt_type) {
@@ -2933,6 +2939,7 @@ int hci_recv_frame(struct hci_dev *hdev,break ;default :kfree_skb (skb); +hci_req_sync_unlock (hdev);return -EINVAL ; }
@@ -2944,6 +2951,7 @@ int hci_recv_frame(struct hci_dev *hdev,skb_queue_tail (&hdev->rx_q, skb);queue_work (hdev->workqueue, &hdev->rx_work); +hci_req_sync_unlock (hdev);return 0 ; }
--
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Tested on:
commit: bf9aa14f Merge tag 'timers-core-2024-11-18' of git://g.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=171b4ae8580000 kernel config: https://syzkaller.appspot.com/x/.config?x=8b2ddebc25a60ddb dashboard link: https://syzkaller.appspot.com/bug?extid=3e07a461b836821ff70e compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 patch: https://syzkaller.appspot.com/x/patch.diff?x=125cbbf7980000
Note: testing is done by a robot and is best-effort only.
syzbot
syzbotsyzbot has found a reproducer for the following issue on:
syzbot has found a reproducer for the following issue on:
HEAD commit: a5806cd506af Linux 6.15-rc7 git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=14bd52d4580000 kernel config: https://syzkaller.appspot.com/x/.config?x=6c2cd7998c108ba7 dashboard link: https://syzkaller.appspot.com/bug?extid=3e07a461b836821ff70e compiler: Debian clang version 20.1.2 (++20250402124445+58df0ef89dd6-1~exp1~20250402004600.97), Debian LLD 20.1.2 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12bd52d4580000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=170ab1f4580000
Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-a5806cd5.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/114e439a107e/vmlinux-a5806cd5.xz
kernel image: https://storage.googleapis.com/syzbot-assets/28859a387c14/bzImage-a5806cd5.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
------------[ cut here ]------------ workqueue: cannot queue hci_rx_work on wq hci0 WARNING: CPU: 0 PID: 7345 at kernel/workqueue.c:2258 __queue_work+0xd62/0xfe0 kernel/workqueue.c:2256 Modules linked in: CPU: 0 UID: 0 PID: 7345 Comm: syz-executor130 Not tainted 6.15.0-rc7-syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:__queue_work+0xd62/0xfe0 kernel/workqueue.c:2256 Code: 42 80 3c 20 00 74 08 4c 89 ef e8 89 de 96 00 49 8b 75 00 49 81 c7 78 01 00 00 48 c7 c7 40 cc 69 8b 4c 89 fa e8 9f 40 f9 ff 90 <0f> 0b 90 90 e9 f1 f4 ff ff e8 00 e4 34 00 90 0f 0b 90 e9 dd fc ff RSP: 0018:ffffc9000f4d7a88 EFLAGS: 00010046 RAX: 701780e79c022b00 RBX: 0000000000000000 RCX: ffff88803d9a0000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000002 RBP: 1ffff110022be938 R08: ffff88801fe23e93 R09: 1ffff11003fc47d2 R10: dffffc0000000000 R11: ffffed1003fc47d3 R12: dffffc0000000000 R13: ffff8880437f0a98 R14: ffff88803d9a0000 R15: ffff8880115f4978 FS: 00007f9904bca6c0(0000) GS:ffff88808d6c2000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000200000000040 CR3: 000000004012c000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> queue_work_on+0x181/0x270 kernel/workqueue.c:2392 queue_work include/linux/workqueue.h:662 [inline] hci_recv_frame+0x5ad/0x700 net/bluetooth/hci_core.c:2926 vhci_get_user drivers/bluetooth/hci_vhci.c:512 [inline] vhci_write+0x358/0x4a0 drivers/bluetooth/hci_vhci.c:608 new_sync_write fs/read_write.c:591 [inline] vfs_write+0x548/0xa90 fs/read_write.c:684 ksys_write+0x145/0x250 fs/read_write.c:736 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f9905433a6f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 d9 6b 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 2c 6c 02 00 48 RSP: 002b:00007f9904bca1e0 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f99054bf3f8 RCX: 00007f9905433a6f RDX: 0000000000000007 RSI: 0000200000000040 RDI: 00000000000000ca RBP: 0000200000000040 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 00007f99054bf3f0 R13: 00007f99054bf3fc R14: 0000000000000040 R15: 00007ffdd9006d98 </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.