Commit Graph

5325 Commits

Author SHA1 Message Date
Rahul Tank 7f12074cc7 fix(nimble): Fixed incorrect parameter updation in duplication ext list 2026-04-27 16:21:56 +05:30
Rahul Tank c852bb076b fix(nimble): Move ble_log_init/deinit to esp_nimble_init/deinit 2026-04-27 14:17:41 +05:30
Rahul Tank 5ac39652ce fix(nimble): Fix scan response data checks for AD flags 2026-04-27 14:17:41 +05:30
Rahul Tank 9013d28440 fix(nimble): Handle corner case scenarios for ble_adv_reattempt.retry 2026-04-27 14:17:41 +05:30
Astha Verma d0e4eb98b1 fix(nimble): Preserve device name across ble_svc_gap_init re-call 2026-04-27 14:17:41 +05:30
Rahul Tank 04b35e4069 fix(nimble): Adding missing esp_nimble_enable/disbale declaration in header file 2026-04-24 11:18:08 +05:30
Rahul Tank 44a5bbb58c fix(nimble): Filter benign return codes from ERROR logs 2026-04-23 15:43:09 +05:30
Sahil Yadav a912bfcaf2 feat(nimble): Support for sending NimBLE logs over SPI 2026-04-18 21:47:15 +05:30
Szymon Janc df52b386a0 nimble/host: Improve SMP Security Request handling
Require peer authentication (encryption) prior to allowing security
level elevation. If peer is not able to authenticate this falls into
'lost bond' scenario and is handled as such.
2026-04-17 14:13:50 +05:30
Szymon Janc d014127c63 nimble/host: Check if HCI command buffer was allocated
BLE_HS_DBG_ASSERT is not enabled by default, and that code is
already handling error path.
2026-04-17 13:20:57 +05:30
Szymon Janc 50409a3435 nimble/gap: Check if conn is present if with asserts disabled
BLE_HS_DBG_ASSERT is not enabled by default, and that code is
already handling error path.
2026-04-17 13:20:57 +05:30
Szymon Janc d8106042fa nimble/transport: Skip H4 event parsing if received event is too big
If received HCI event is too big to handle just return error and
stop parsing instead of overwriting data in memeory.
2026-04-17 13:20:57 +05:30
Sahil Yadav e52e061c49 feat(nimble): Add support to 6.2 BLE HCI Command Event(FSU, UTP over OTA) 2026-04-15 10:07:37 +05:30
Rahul Tank f40b4612ec fix(nimble): Fix prox service to handle negative values 2026-04-14 14:24:22 +05:30
Rahul Tank e934bb10bc fix(nimble): Resolve host lock assert issue 2026-04-13 11:22:32 +05:30
Rahul Tank 5255b4ba60 fix(nimble): Fix DTM test end packet count parsing 2026-04-07 14:55:29 +05:30
wangjialiang e8d3aced0e fix(ble): fix ble iso compiler error 2026-04-03 16:56:48 +08:00
Astha Verma b683865655 fix(nimble): fix null dereference of ble_gatts_conn_aware_states after gatts stop 2026-04-02 21:19:01 +05:30
ShenWeilong 2d0d4de008 fix: fixed some issues in the mr comments 2026-04-02 14:37:08 +08:00
ShenWeilong 095d93bd11 feat(nimble): Added npl for btdm sofware arch 2026-04-02 14:37:08 +08:00
ShenWeilong 8589109b05 feat(nimble): Added transport/esp_ipc_btdm for btdm atch 2026-04-02 14:37:08 +08:00
Sumeet Singh 23bfcada3e feat(nimble): EATT doxygen documentation 2026-04-02 06:51:56 +05:30
Sumeet Singh 40997ca6ee fix(nimble): Fix encrypted advertisement NVS struct 2026-03-26 10:53:04 +05:30
Rahul Tank 697427ff39 fix(nimble): Correct adv_list_init / deinit during nimble init / deinit 2026-03-26 10:52:29 +05:30
Rahul Tank 7075927f97 fix(nimble): Issue connect cancel in case of outstanding master connection 2026-03-23 07:14:15 +05:30
cjin 27db5fca0e fix: add os mempool unregister to prevent mem trampling 2026-03-17 14:24:34 +08:00
cjin d166751d69 feat: move mempool outside nimble host 2026-03-13 09:23:35 +08:00
Sumeet Singh 5c1a43ca3d fix(nimble): modify logic to print mbuf in ble_hs_log_mbuf 2026-03-11 17:04:22 +05:30
Rahul Tank 45e6fad7cd fix(nimble): Add header file to expose macros 2026-03-03 14:03:28 +05:30
Rahul Tank 037bd41ee9 fix(nimble): Fixed memory leak when dynamic services are disabled 2026-02-27 11:14:20 +05:30
Linyan Liu 66aa48348a fix(nimble): Miscellaneous ISO fixes due to some previous changes 2026-02-25 20:05:55 +08:00
Rahul Tank 88217237df fix(nimble): Fix various issues for security/vulnerability in host 2026-02-23 14:03:23 +05:30
Astha Verma 6128c09f0b fix(nimble): Fix memory leak when enabling gatt caching 2026-02-16 10:57:21 +05:30
Rahul Tank 5b0cb71162 fix(nimble) Fix tinycrypt compilation issues when enabled 2026-02-16 10:56:40 +05:30
Rahul Tank f117896558 fix(nimble): Fix to not send legacy command incorrectly 2026-02-16 10:55:11 +05:30
Rahul Tank de131fad68 fix(nimble): Handle scenario of simultaneous connect 2026-02-16 10:54:31 +05:30
Rahul Tank e94da35c60 fix(nimble): Add support to allow multiple ext adv 2026-02-16 10:54:02 +05:30
Shreeyash 27b6525dbc fix(nimble): delete connection after lookup in ble_gap_conn_broken 2026-02-16 10:53:44 +05:30
Rahul Tank 0fb1f1ef11 fix(nimble): Fix various documentation/ assignment / fixes 2026-02-16 10:53:26 +05:30
Deomid rojer Ryabkov 420a6e672e fix(nimble): Replace use of CTR DRBG with mbedtls_esp_random 2026-02-05 21:09:02 +05:30
Shreeyash 8b13cff2e2 fix(nimble): Fix host init assert when periodic sync is disabled 2026-02-03 12:42:17 +05:30
Rahul Tank 068f3b56b5 fix(nimble): Added change to copy adv params to be reused during reattempt adv 2026-02-03 12:41:42 +05:30
Rahul Tank 89fd215ed5 fix(nimble): Fixed duplication of HCI record entry HCI logging 2026-02-03 12:40:46 +05:30
Andrzej Kaczmarek f6bb6468e2 nimble/host: Fix L2CAP unit tests
This fixes L2CAP unit tests after latest rework.
2026-02-03 12:39:19 +05:30
Andrzej Kaczmarek 4f5675f517 nimble/host: Rework L2CAP RX
This reworks L2CAP RX path to simplify flow and fix reassembly issues.

RX is now done in conn context instead of chan context. This allows to
save few bytes of memory per chan since RX data are now held per-conn
instead of per-chan.

The new code also fixes reassembly issue where we couldn't properly
reassemble L2CAP SDU if the first fragment was shorter than the L2CAP
header.
2026-02-03 12:39:04 +05:30
Rahul Tank eed4636870 fix(nimble): Address security vulnerabilties and NVS corruption issues.
Security Issues Fixed:

1. Buffer Overflow Prevention (ble_store_nvs.c)
- Changed all sprintf() calls to snprintf() in get_nvs_key_string()
  to prevent potential buffer overflow when generating NVS key strings
- Changed index parameter type from int8_t to int in ble_nvs_delete_value()
  to handle values > 127 correctly

2. Bounds Checking (ble_store_nvs.c)
- Added bounds checking in populate_db_from_nvs() before each memcpy
  operation to prevent buffer overflow when NVS contains more entries
  than RAM arrays can hold (due to config mismatch or NVS corruption)

3. Array Index Validation (ble_store_nvs.c)
- Fixed potential array index -1 access in ble_nvs_restore_sec_keys()
  by adding checks before accessing [num - 1] indices
- Fixed loop bounds to use actual populated count instead of max config value

4. NVS Data Size Validation (ble_store_nvs.c)
- Added get_expected_size_for_obj_type() helper function
- Added size validation in get_nvs_db_value() and get_nvs_peer_record()
  to detect corrupted or version-mismatched NVS data before reading

5. Type Safety Fix (ble_store_config_conf.c)
- Fixed critical typo: && to & for ble_store_config_num_csfcs
- Added missing union members (csfc, ead) in ble_store_config_conf_export()

6. Thread Safety (ble_gattc_cache.c)
- Replaced static buffer with thread-local storage (__thread) in getKeyname()
- Changed sprintf() to snprintf() with explicit size limit
- Increased buffer size from 16 to 20 bytes for safety margin
2026-02-03 12:35:05 +05:30
Rahul Tank 62b826c2f8 fix(nimble): Add extra logs to track critical failures 2026-02-03 12:34:32 +05:30
Rahul Tank 918ae0721b fix(nimble): Fix coverity reported issue
Handled unchecked return value in ble_hs_pvcy.c
2026-02-03 12:33:41 +05:30
Astha Verma 58e43f9e60 fix(nimble): Fix early cleanup when periodic sync reattempts exhausted 2026-02-03 11:57:49 +05:30
Astha Verma 039d2d62ed fix(nimble): fix esp_hid_device example when static_to_dynamic enabled 2026-01-21 16:46:54 +05:30