Skip to content
Commit 5f8e657a authored by Jonathan Rico's avatar Jonathan Rico Committed by Fabio Baltieri
Browse files

Bluetooth: att: limit EATT MTU to max buffer size



If a device sends an MTU that is bigger than our maximum tx buffer size,
that could cause assertion failures down the line.

This PR limits it to the maximum we support (CONFIG_BT_L2CAP_TX_MTU).

The issue has been observed with a gatt discovery procedure, but is likely
present in other places in att.c.

To reproduce it, we need two zephyr shell devices, with one having a larger
MTU than the other:
- connect
- do data length update to the bigger MTU
- set security to 2, EATT channels get connected
- launch a gatt discovery from the device with the larger MTU
- observe kernel panic on the other device when it attempts to add too much
memory to a net buf.

Signed-off-by: default avatarJonathan Rico <jonathan.rico@nordicsemi.no>
parent e869cff9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment