Skip to content
/ linux Public

Commit 37021b1

Browse files
ceggers-arrigregkh
authored andcommitted
Bluetooth: LE L2CAP: Disconnect if sum of payload sizes exceed SDU
[ Upstream commit b6a2bf4 ] Core 6.0, Vol 3, Part A, 3.4.3: "... If the sum of the payload sizes for the K-frames exceeds the specified SDU length, the receiver shall disconnect the channel." This fixes L2CAP/LE/CFC/BV-27-C (running together with 'l2test -r -P 0x0027 -V le_public'). Fixes: aac23bf ("Bluetooth: Implement LE L2CAP reassembly") Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 734aa84 commit 37021b1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/bluetooth/l2cap_core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6721,6 +6721,7 @@ static int l2cap_ecred_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb)
67216721

67226722
if (chan->sdu->len + skb->len > chan->sdu_len) {
67236723
BT_ERR("Too much LE L2CAP data received");
6724+
l2cap_send_disconn_req(chan, ECONNRESET);
67246725
err = -EINVAL;
67256726
goto failed;
67266727
}

0 commit comments

Comments
 (0)