From: patchwork-bot+bluetooth@kernel.org
To: ZhaoJinming <zhaojinming@uniontech.com>
Cc: marcel@holtmann.org, luiz.dentz@gmail.com,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: virtio_bt: Fix use-after-free and memory leak in probe error paths
Date: Tue, 11 Aug 2026 20:10:27 +0000 [thread overview]
Message-ID: <178647902738.1134064.8343131189969253325.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20260811-virtio-bt-fix-probe-errors-v1-1-2f1acfde8336@uniontech.com>
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Tue, 11 Aug 2026 16:47:37 +0800 you wrote:
> When virtbt_open_vdev() fails in virtbt_probe(), hci_free_dev(hdev) is
> called without first calling hci_unregister_dev(hdev). Since
> hci_register_dev() already succeeded, the HCI device remains registered
> while its memory is freed, leading to a use-after-free when accessed
> via sysfs or HCI sockets.
>
> Additionally, the probe function leaks the virtio_bluetooth structure
> (vbt) in several error paths:
> - When virtio_find_vqs() fails, vbt is not freed.
> - When hci_alloc_dev() or hci_register_dev() fails, vbt is not freed.
> - When virtbt_open_vdev() fails, vbt is not freed.
>
> [...]
Here is the summary with links:
- Bluetooth: virtio_bt: Fix use-after-free and memory leak in probe error paths
https://git.kernel.org/bluetooth/bluetooth-next/c/444612a87229
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
prev parent reply other threads:[~2026-08-11 20:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 8:47 [PATCH] Bluetooth: virtio_bt: Fix use-after-free and memory leak in probe error paths ZhaoJinming
2026-08-11 10:14 ` bluez.test.bot
2026-08-11 20:10 ` patchwork-bot+bluetooth [this message]
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=178647902738.1134064.8343131189969253325.git-patchwork-notify@kernel.org \
--to=patchwork-bot+bluetooth@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=zhaojinming@uniontech.com \
/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