]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: L2CAP: Fix not checking output MTU is acceptable on L2CAP_ECRED_CONN_REQ
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 17 Feb 2026 18:29:43 +0000 (13:29 -0500)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:20:54 +0000 (07:20 -0500)
commitdf791c24f561f389fbc05d014f3404113688ef3c
tree4333776594b09fcec52c64eb063f3f18b5ea054a
parent920b6498ecd0e57685f1ecf3f2ef6c67e9435bc4
Bluetooth: L2CAP: Fix not checking output MTU is acceptable on L2CAP_ECRED_CONN_REQ

[ Upstream commit a8d1d73c81d1e70d2aa49fdaf59d933bb783ffe5 ]

Upon receiving L2CAP_ECRED_CONN_REQ the given MTU shall be checked
against the suggested MTU of the listening socket as that is required
by the likes of PTS L2CAP/ECFC/BV-27-C test which expects
L2CAP_CR_LE_UNACCEPT_PARAMS if the MTU is lowers than socket omtu.

In order to be able to set chan->omtu the code now allows setting
setsockopt(BT_SNDMTU), but it is only allowed when connection has not
been stablished since there is no procedure to reconfigure the output
MTU.

Link: https://github.com/bluez/bluez/issues/1895
Fixes: 15f02b910562 ("Bluetooth: L2CAP: Add initial code for Enhanced Credit Based Mode")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_sock.c