]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 23 Feb 2026 21:07:55 +0000 (16:07 -0500)
commita8d1d73c81d1e70d2aa49fdaf59d933bb783ffe5
treeb88b2c3d6c58775e50150e478488182e77cf389a
parent7cff9a40c6b0f72ccefdaf0ffe03cfac30348f51
Bluetooth: L2CAP: Fix not checking output MTU is acceptable on L2CAP_ECRED_CONN_REQ

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>
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_sock.c