]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: L2CAP: Fix attempting to adjust outgoing MTU
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 16 Jul 2025 13:40:49 +0000 (09:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Jul 2025 06:58:39 +0000 (08:58 +0200)
commitd4c364a2d7f91d3ae20b3237a2908e8aec3ad33a
tree8a0b74da1fae97b5945221b34c44291049aadb5a
parent6077e3c1e2ed4c64de8601b719138cfcc025ed93
Bluetooth: L2CAP: Fix attempting to adjust outgoing MTU

[ Upstream commit d24e4a7fedae121d33fb32ad785b87046527eedb ]

Configuration request only configure the incoming direction of the peer
initiating the request, so using the MTU is the other direction shall
not be used, that said the spec allows the peer responding to adjust:

Bluetooth Core 6.1, Vol 3, Part A, Section 4.5

 'Each configuration parameter value (if any is present) in an
 L2CAP_CONFIGURATION_RSP packet reflects an ‘adjustment’ to a
 configuration parameter value that has been sent (or, in case of
 default values, implied) in the corresponding
 L2CAP_CONFIGURATION_REQ packet.'

That said adjusting the MTU in the response shall be limited to ERTM
channels only as for older modes the remote stack may not be able to
detect the adjustment causing it to silently drop packets.

Link: https://github.com/bluez/bluez/issues/1422
Link: https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/issues/149
Link: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4793
Fixes: 042bb9603c44 ("Bluetooth: L2CAP: Fix L2CAP MTU negotiation")
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