zephyr/subsys/bluetooth/host
Jonathan Rico 5f8e657a22 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: Jonathan Rico <jonathan.rico@nordicsemi.no>
2022-09-29 10:16:57 +00:00
..
a2dp_internal.h
a2dp.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
addr.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
adv.c Bluetooth: Host: Make adv error reporting more consistent 2022-09-16 10:53:31 +01:00
adv.h
aes_ccm.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
at.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
at.h
att_internal.h Bluetooth: Host: Check if channel option is valid 2022-08-19 11:59:52 +02:00
att.c Bluetooth: att: limit EATT MTU to max buffer size 2022-09-29 10:16:57 +00:00
avdtp_internal.h subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
avdtp.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
br.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
br.h
buf.c tests: bluetooth: host: Add mocks for buf.c 2022-09-09 10:06:19 +02:00
CMakeLists.txt Bluetooth: host: add dedicated WQ for long-running tasks 2022-06-30 10:31:13 +02:00
conn_internal.h Bluetooth: ISO: Add sn and ts to bt_iso_chan_send 2022-06-07 18:53:44 +02:00
conn.c Bluetooth: Host: Add "assert non-null" to bt_conn_ref 2022-09-20 08:22:28 +00:00
crypto.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
crypto.h
direction_internal.h Bluetooth: Host: Add common handling of VS IQ report 2022-08-19 16:26:10 +02:00
direction.c Bluetooth: Host: Add common handling of VS IQ report 2022-08-19 16:26:10 +02:00
ecc.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
ecc.h
gatt_internal.h Bluetooth: GATT: Add LE Secure Connections Permission Check 2022-07-19 10:32:56 +02:00
gatt.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
hci_common.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
hci_core.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
hci_core.h Bluetooth: Host: Add common handling of VS IQ report 2022-08-19 16:26:10 +02:00
hci_ecc.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
hci_ecc.h Bluetooth: host: add dedicated WQ for long-running tasks 2022-06-30 10:31:13 +02:00
hci_raw_internal.h
hci_raw.c Bluetooth: host: add dedicated WQ for long-running tasks 2022-06-30 10:31:13 +02:00
hfp_hf.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
hfp_internal.h
id.c Bluetooth: Controller: Add error log for Advertising enable/disable 2022-09-21 13:04:00 +00:00
id.h bluetooth: add api for changing rpa timeout in runtime 2022-07-11 09:27:07 +00:00
iso_internal.h Bluetooth: ISO: Add sn and ts to bt_iso_chan_send 2022-06-07 18:53:44 +02:00
iso.c Bluetooth: Audio: Set transparent coding format for default ISO path 2022-09-09 10:08:34 +02:00
Kconfig Bluetooth: Increase RX thread stack size 2022-08-26 12:52:22 +02:00
Kconfig.gatt Bluetooth: gatt: allow disabling subscription enforcement 2022-08-19 12:14:21 +02:00
Kconfig.l2cap Bluetooth: has: Add initial Hearing Access Service client 2022-04-07 09:37:53 +02:00
keys_br.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
keys.c tests: bluetooth: host: Add UT for bt_keys_get_addr() 2022-09-26 13:05:47 +02:00
keys.h Bluetooth: Host: Name enum bt_keys_type 2022-09-20 08:22:06 +00:00
l2cap_br.c Bluetooth: l2cap: prevent deadlock on chan timeout 2022-09-26 15:13:13 +00:00
l2cap_internal.h Bluetooth: Host: Fix L2CAP collision mitigation 2022-05-10 18:40:36 +02:00
l2cap.c Bluetooth: l2cap: prevent deadlock on chan timeout 2022-09-26 15:13:13 +00:00
long_wq.c Bluetooth: host: add dedicated WQ for long-running tasks 2022-06-30 10:31:13 +02:00
long_wq.h Bluetooth: host: add dedicated WQ for long-running tasks 2022-06-30 10:31:13 +02:00
monitor.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
monitor.h Bluetooth: Host: Monitor: Make addr param const in bt_monitor_new_index 2022-08-25 12:18:09 +02:00
rfcomm_internal.h subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
rfcomm.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
scan.c Bluetooth: Host: Fix invalid sync term callback params 2022-08-26 12:51:05 +02:00
scan.h Bluetooth: Host: add missing de-init of periodic sync pool 2022-07-13 16:13:57 +02:00
sdp_internal.h
sdp.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
settings.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
settings.h
smp_null.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
smp.c Bluetooth: host: Log SC LTK in pairing procedure without bonding 2022-09-29 10:15:08 +00:00
smp.h bluetooth: smp: Add authentication callbacks per connection 2022-08-10 12:49:30 +02:00
ssp.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
ssp.h
testing.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
testing.h
uuid.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00