All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci_core: Fix leaking sent_cmd skb
@ 2022-02-04 21:12 Luiz Augusto von Dentz
  2022-02-04 21:12 ` [RFC] Bluetooth: hci_core: Introduce hci_recv_event_data Luiz Augusto von Dentz
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2022-02-04 21:12 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

sent_cmd memory is not freed before freeing hci_dev causing it to leak
it contents.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
 net/bluetooth/hci_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5bde0ec41177..b4782a6c1025 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2739,6 +2739,7 @@ void hci_release_dev(struct hci_dev *hdev)
 	hci_dev_unlock(hdev);
 
 	ida_simple_remove(&hci_index_ida, hdev->id);
+	kfree_skb(hdev->sent_cmd);
 	kfree(hdev);
 }
 EXPORT_SYMBOL(hci_release_dev);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-02-08  1:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-04 21:12 [PATCH] Bluetooth: hci_core: Fix leaking sent_cmd skb Luiz Augusto von Dentz
2022-02-04 21:12 ` [RFC] Bluetooth: hci_core: Introduce hci_recv_event_data Luiz Augusto von Dentz
2022-02-04 21:40   ` bluez.test.bot
2022-02-07 15:53   ` Marcel Holtmann
2022-02-08  0:16     ` Luiz Augusto von Dentz
2022-02-04 21:55 ` Bluetooth: hci_core: Fix leaking sent_cmd skb bluez.test.bot
2022-02-07 15:55 ` [PATCH] " Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.