Re: [PATCH] Bluetooth: L2CAP: validate frame length before control and FCS access

From: patchwork-bot+bluetooth

Date: Wed Sep 16 2026 - 14:07:56 EST


Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>:

On Tue, 15 Sep 2026 13:02:39 -0300 you wrote:
> l2cap_data_rcv() unpacks either a two-byte or four-byte control field
> without first ensuring that it is present. A short ERTM or streaming-mode
> frame can therefore cause an out-of-bounds read.
>
> There is a second short-frame case when CRC16 is enabled. After the
> control field is pulled, l2cap_check_fcs() subtracts two from skb->len
> without checking it. If fewer than two bytes remain, the subtraction
> wraps; skb_trim() leaves the buffer unchanged and the subsequent FCS
> load reads past the logical end of the frame.
>
> [...]

Here is the summary with links:
- Bluetooth: L2CAP: validate frame length before control and FCS access
https://git.kernel.org/bluetooth/bluetooth-next/c/6c78a213d907

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html