From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>,
Marcel Holtmann <marcel@holtmann.org>,
Sasha Levin <sashal@kernel.org>,
johan.hedberg@gmail.com, luiz.dentz@gmail.com,
davem@davemloft.net, kuba@kernel.org,
linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.16 14/27] Bluetooth: hci_core: Fix leaking sent_cmd skb
Date: Wed, 9 Mar 2022 11:16:51 -0500 [thread overview]
Message-ID: <20220309161711.135679-14-sashal@kernel.org> (raw)
In-Reply-To: <20220309161711.135679-1-sashal@kernel.org>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
[ Upstream commit dd3b1dc3dd050f1f47cd13e300732852414270f8 ]
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>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 6c00ce302f09..1c8fb27b155a 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3969,6 +3969,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
next prev parent reply other threads:[~2022-03-09 16:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220309161711.135679-1-sashal@kernel.org>
2022-03-09 16:16 ` [PATCH AUTOSEL 5.16 03/27] xfrm: Check if_id in xfrm_migrate Sasha Levin
2022-03-09 16:16 ` [PATCH AUTOSEL 5.16 04/27] xfrm: Fix xfrm migrate issues when address family changes Sasha Levin
2022-03-09 16:16 ` [PATCH AUTOSEL 5.16 11/27] mac80211: refuse aggregations sessions before authorized Sasha Levin
2022-03-09 16:16 ` Sasha Levin [this message]
2022-03-09 16:16 ` [PATCH AUTOSEL 5.16 15/27] can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready Sasha Levin
2022-03-09 16:16 ` [PATCH AUTOSEL 5.16 16/27] net: sparx5: Add #include to remove warning Sasha Levin
2022-03-09 16:49 ` Jakub Kicinski
2022-03-16 14:45 ` Sasha Levin
2022-03-09 16:16 ` [PATCH AUTOSEL 5.16 17/27] atm: firestream: check the return value of ioremap() in fs_init() Sasha Levin
2022-03-09 16:48 ` Jakub Kicinski
2022-03-16 14:49 ` Sasha Levin
2022-03-09 16:16 ` [PATCH AUTOSEL 5.16 21/27] iwlwifi: don't advertise TWT support Sasha Levin
2022-03-09 16:17 ` [PATCH AUTOSEL 5.16 23/27] nl80211: Update bss channel on channel switch for P2P_CLIENT Sasha Levin
2022-03-09 16:17 ` [PATCH AUTOSEL 5.16 24/27] tcp: make tcp_read_sock() more robust Sasha Levin
2022-03-09 16:17 ` [PATCH AUTOSEL 5.16 25/27] sfc: extend the locking on mcdi->seqno Sasha Levin
2022-03-09 16:17 ` [PATCH AUTOSEL 5.16 26/27] bnx2: Fix an error message Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220309161711.135679-14-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=davem@davemloft.net \
--cc=johan.hedberg@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=luiz.von.dentz@intel.com \
--cc=marcel@holtmann.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).