zephyr/subsys/bluetooth/host
Nirav Agrawal 5a8189bf2a bluetooth: host: gatt: fix null-ptr access if no include-svc userdata
- Issue: There is a bus-fault while accessing empty userdata structure
  pointer if application does not include any include service
  userdata instance (which consist of UUID list of included service)
  but service array has defined dummy entry for it assumed to be
  overridden by app during initial flow.
- For example, the issue has happened in case of tmap-central sample
 without "CONFIG_BT_OTS" support. there are some MCS attributes
 dependent on OTS service because of that
 "BT_GATT_INCLUDE_SERVICE(NULL)" entry is added as part of service
 definition. The given entry does not have userdata handler defined
 and is expecting to be overriden by the app if it will be included.
 During "bt_mcs_init()" call, "mcs.attrs[i].user_data" is not
 populated with any attr-instance pointer. This makes CPU to access
 null-address during reading local-database include-service attribute
 which was not provided by the app but the include-service entry was
 added to the db.
- Fix: Adding condition to check if user-data has null address, and
 returning back to avoid any hard-faults.

Signed-off-by: Nirav Agrawal <nirav.agrawal@nxp.com>
2025-06-25 15:51:24 -10:00
..
classic Bluetooth: Host: Classic: Use bt_hci_cmd_alloc() 2025-06-23 12:44:53 -07:00
shell Bluetooth: Host: shell: Use bt_hci_cmd_alloc() 2025-06-23 12:44:53 -07:00
addr_internal.h
addr.c Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
adv.c Bluetooth: Host: adv: Use bt_hci_cmd_alloc() 2025-06-23 12:44:53 -07:00
adv.h Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
aes_ccm.c Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
att_internal.h Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
att.c Bluetooth: Host: K_NO_WAIT in bt_att_req_alloc() in SYS WQ 2025-05-14 14:15:58 +02:00
buf_view.h Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
buf.c Bluetooth: HCI: Use H:4 encoding for buffers 2025-04-29 13:00:33 +02:00
CMakeLists.txt Bluetooth: Host: Remove HCI ECC emulation 2025-01-23 10:14:46 +01:00
conn_internal.h Bluetooth: Classic: SSP: Correct pairing method 2025-05-14 19:36:17 +02:00
conn.c Bluetooth: Host: conn: Use bt_hci_cmd_alloc() 2025-06-23 12:44:53 -07:00
crypto_psa.c Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
crypto.h bluetooth: host/crypto: fix the psa crypto init for host 2025-02-10 14:33:24 +01:00
cs.c Bluetooth: Host: cs: Use bt_hci_cmd_alloc() 2025-06-23 12:44:53 -07:00
data.c Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
direction_internal.h Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
direction.c Bluetooth: Host: direction: Use bt_hci_cmd_alloc() 2025-06-23 12:44:53 -07:00
ecc.c Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
ecc.h Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
gatt_internal.h Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
gatt.c bluetooth: host: gatt: fix null-ptr access if no include-svc userdata 2025-06-25 15:51:24 -10:00
hci_common.c Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
hci_core.c Bluetooth: Host: core: Use bt_hci_cmd_alloc() 2025-06-23 12:44:53 -07:00
hci_core.h Revert "Bluetooth: host: Send host num completes as early as possible" 2025-05-14 11:03:02 +01:00
hci_raw_internal.h Bluetooth: Host: Remove deprecated HCI driver API 2024-11-22 11:37:12 +01:00
hci_raw.c Bluetooth: HCI: Use H:4 encoding for buffers 2025-04-29 13:00:33 +02:00
id.c Bluetooth: Host: id: Use bt_hci_cmd_alloc() 2025-06-23 12:44:53 -07:00
id.h Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
iso_internal.h Bluetooth: HCI: Use H:4 encoding for buffers 2025-04-29 13:00:33 +02:00
iso.c Bluetooth: Host: iso: Use bt_hci_cmd_alloc() 2025-06-23 12:44:53 -07:00
Kconfig bluetooth: host: Deprecated BT_CONN_TX_MAX 2025-05-12 14:54:26 +02:00
Kconfig.gatt bluetooth: host: fix GATT writable Kconfig descriptions 2025-03-28 08:50:05 +01:00
Kconfig.l2cap Bluetooth: Tester: Use BT_L2CAP_SEG_RECV for L2CAP tests 2024-11-27 08:16:18 +01:00
keys.c bluetooth: keys: addr is null and assert in bt_keys_find_addr 2025-06-10 13:28:55 +02:00
keys.h Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
l2cap_internal.h Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
l2cap.c Bluetooth: Host: L2CAP: Fix checking signaling packets size 2025-05-27 16:44:17 +02:00
long_wq.c Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
long_wq.h Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
monitor.c Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
monitor.h Bluetooth: HCI: Use H:4 encoding for buffers 2025-04-29 13:00:33 +02:00
scan.c Bluetooth: Host: scan: Use bt_hci_cmd_alloc() 2025-06-23 12:44:53 -07:00
scan.h Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
settings.c Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
settings.h Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
smp_null.c Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
smp.c Bluetooth: Host: Fix SMP Pairing failed code on invalid Public Key 2025-06-13 10:21:42 -07:00
smp.h Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00
uuid.c Bluetooth: Host: Add missing includes for all BT host files 2025-04-17 21:17:29 +02:00