Re: [syzbot] [bluetooth?] [usb?] memory leak in __hci_cmd_sync_sk
From: Edward Adam Davis
Date: Mon Nov 17 2025 - 21:53:14 EST
#syz test
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 6e76798ec786..553cfc4f7886 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -177,8 +177,11 @@ struct sk_buff *__hci_cmd_sync_sk(struct hci_dev *hdev, u16 opcode, u32 plen,
hdev->req_status != HCI_REQ_PEND,
timeout);
- if (err == -ERESTARTSYS)
+ if (err == -ERESTARTSYS) {
+ flush_work(&hdev->cmd_work);
+ skb_queue_purge(&req.cmd_q);
return ERR_PTR(-EINTR);
+ }
switch (hdev->req_status) {
case HCI_REQ_DONE: