netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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.15 13/24] Bluetooth: hci_core: Fix leaking sent_cmd skb
Date: Wed,  9 Mar 2022 11:19:32 -0500	[thread overview]
Message-ID: <20220309161946.136122-13-sashal@kernel.org> (raw)
In-Reply-To: <20220309161946.136122-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 53f1b08017aa..c67390367cc2 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -4083,6 +4083,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


  parent reply	other threads:[~2022-03-09 16:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220309161946.136122-1-sashal@kernel.org>
2022-03-09 16:19 ` [PATCH AUTOSEL 5.15 02/24] xfrm: Check if_id in xfrm_migrate Sasha Levin
2022-03-09 16:19 ` [PATCH AUTOSEL 5.15 03/24] xfrm: Fix xfrm migrate issues when address family changes Sasha Levin
2022-03-09 16:19 ` [PATCH AUTOSEL 5.15 10/24] mac80211: refuse aggregations sessions before authorized Sasha Levin
2022-03-09 16:19 ` Sasha Levin [this message]
2022-03-09 16:19 ` [PATCH AUTOSEL 5.15 14/24] can: rcar_canfd: rcar_canfd_channel_probe(): register the CAN device when fully ready Sasha Levin
2022-03-09 16:19 ` [PATCH AUTOSEL 5.15 15/24] net: sparx5: Add #include to remove warning Sasha Levin
2022-03-09 16:19 ` [PATCH AUTOSEL 5.15 16/24] atm: firestream: check the return value of ioremap() in fs_init() Sasha Levin
2022-03-09 16:19 ` [PATCH AUTOSEL 5.15 18/24] iwlwifi: don't advertise TWT support Sasha Levin
2022-03-09 16:19 ` [PATCH AUTOSEL 5.15 20/24] nl80211: Update bss channel on channel switch for P2P_CLIENT Sasha Levin
2022-03-09 16:19 ` [PATCH AUTOSEL 5.15 21/24] tcp: make tcp_read_sock() more robust Sasha Levin
2022-03-09 16:19 ` [PATCH AUTOSEL 5.15 22/24] sfc: extend the locking on mcdi->seqno Sasha Levin
2022-03-09 16:19 ` [PATCH AUTOSEL 5.15 23/24] 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=20220309161946.136122-13-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).