From: Christian Eggers <ceggers@arri.de>
To: <linux-bluetooth@vger.kernel.org>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Subject: Re: [PATCH v2] Bluetooth: L2CAP: CoC: Disconnect if received packet size exceeds MPS
Date: Fri, 27 Feb 2026 17:30:04 +0100 [thread overview]
Message-ID: <2584880.XAFRqVoOGU@n9w6sw14> (raw)
In-Reply-To: <20260226204357.361000-1-luiz.dentz@gmail.com>
On Thursday, 26 February 2026, 21:43:57 CET, Luiz Augusto von Dentz wrote:
> From: Christian Eggers <ceggers@arri.de>
>
> Core 6.0, Vol 3, Part A, 3.4.3:
> "... If the payload size of any K-frame exceeds the receiver's MPS, the
> receiver shall disconnect the channel..."
>
> This fixes L2CAP/LE/CFC/BV-27-C (running together with 'l2test -r -P
> 0x0027 -V le_public -I 100').
>
> Signed-off-by: Christian Eggers <ceggers@arri.de>
> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> ---
> Note: due to lack of L2CAP CoC segmentation support in bthost the following
> test as expected to fail:
>
> L2CAP LE Client - Read 32k Success
> L2CAP LE Client - RX Timestamping 32k
>
> net/bluetooth/l2cap_core.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index f550ceceb618..14131e427efd 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -6669,6 +6669,13 @@ static int l2cap_ecred_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb)
> return -ENOBUFS;
> }
>
> + if (skb->len > chan->mps) {
> + BT_ERR("Too big LE L2CAP MPS: len %u > %u", skb->len,
> + chan->mps);
> + l2cap_send_disconn_req(chan, ECONNRESET);
> + return -ENOBUFS;
> + }
> +
> chan->rx_credits--;
> BT_DBG("chan %p: rx_credits %u -> %u",
> chan, chan->rx_credits + 1, chan->rx_credits);
>
Tested-by: Christian Eggers <ceggers@arri.de>
next prev parent reply other threads:[~2026-02-27 16:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 20:43 [PATCH v2] Bluetooth: L2CAP: CoC: Disconnect if received packet size exceeds MPS Luiz Augusto von Dentz
2026-02-26 20:48 ` Luiz Augusto von Dentz
2026-02-27 15:44 ` Christian Eggers
2026-02-26 21:26 ` [v2] " bluez.test.bot
2026-02-27 16:30 ` Christian Eggers [this message]
2026-02-27 18:40 ` [PATCH v2] " patchwork-bot+bluetooth
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=2584880.XAFRqVoOGU@n9w6sw14 \
--to=ceggers@arri.de \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.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