Re: [PATCH] Bluetooth: hci: validate codec capability element length
From: patchwork-bot+bluetooth
Date: Wed Jun 10 2026 - 11:47:53 EST
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>:
On Mon, 8 Jun 2026 23:56:28 +0000 you wrote:
> Read Local Codec Capabilities returns a sequence of capability elements.
> Each element starts with a one-byte length followed by that many payload
> bytes.
>
> hci_read_codec_capabilities() checks that the skb contains the length
> byte, but then validates only caps->len against the remaining skb
> length. A malformed controller response with one remaining byte and
> caps->len set to one passes that check even though the element needs two
> bytes. The parser then records a two-byte capability and copies one
> byte beyond the advertised response payload into the codec list.
>
> [...]
Here is the summary with links:
- Bluetooth: hci: validate codec capability element length
https://git.kernel.org/bluetooth/bluetooth-next/c/246dc2ed724b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html