Commit Graph
2189 Commits
Author SHA1 Message Date
Sumeet Singh 44d956cf6a fix(nimble): Fix GATTC temp-list crash (v6.0) 2026-09-23 17:51:29 +05:30
Jiang Jiang Jian 3309bfc238 Merge branch 'bugfix/spp_deinit_crash_v6.0' into 'release/v6.0'
fix(bt/bluedroid): fixed heap corruption when deinit profiles during SDP discovery(v6.0)

See merge request espressif/esp-idf!53062
2026-09-23 12:03:38 +08:00
Zhou Xiao f4ec0e19b6 fix(bt): initialize BLE Log in host-only mode
Initialize and deinitialize BLE Log from the Bluedroid host lifecycle when the local
controller is disabled. Guard controller mbuf handling with BLE_LOG_LL_ENABLED so host-
only builds do not depend on controller headers.

Update NimBLE to b6e2f93db269ad2bba8715953cb56f93bae4fc2f to provide the corresponding
host-only initialization. Combine the host initialization fix and the final NimBLE
revision into one prerequisite commit.
2026-09-22 14:46:50 +08:00
xiongweichaoandCursor a72a6b60fb fix(bt/bluedroid): fixed heap corruption when deinit A2DP/HID during SDP discovery
Cancel in-flight SDP searches before freeing discovery databases in BTA AV
and HID Host. Otherwise a late SDP response can be parsed into a freed
buffer after esp_a2d_*_deinit / HID host disable, the same class of
corruption as JV/SPP deinit.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 14:14:34 +08:00
xiongweichao 2b2b88a33c fix(bt/bluedroid): fixed heap corruption when deinit SPP during SDP discovery
bta_jv_disable() reset the control block and let BTA_JvFree() release
p_sdp_db/p_sdp_raw_data while an SDP service search could still be in
progress. Late SDP responses were then parsed into the freed discovery
database and corrupted the heap, so the crash surfaced much later in an
unrelated malloc(), inside TLSF remove_free_block().

Cancel the search first. SDP_CancelServiceSearch() moves the connection
control block to SDP_DISC_WAIT_CANCEL, and sdp_disc_server_rsp() matches
none of its PDU cases in that state, so a late response is rejected
instead of being written into the database.

Reachable from both esp_spp_deinit() and esp_bt_l2cap_deinit(), e.g. when
an application deinitializes SPP before ESP_SPP_DISCOVERY_COMP_EVT
arrives.
2026-09-22 14:14:34 +08:00
Astha Verma 8946ea2d7a fix(nimble): Connect with OTA address for host based privacy 2026-09-18 17:22:25 +05:30
Rahul Tank 05e2ad7bb2 Merge branch 'bugfix/l2cap_coc_disconnect_v6.0' into 'release/v6.0'
fix(nimble): fix l2cap_coc throughput disconnect on esp32c2 (v6.0)

See merge request espressif/esp-idf!52829
2026-09-18 16:41:49 +05:30
linruihao d783f9f02d fix(bt/bluedroid): check HFP audio status before forwarding SCO data 2026-09-17 09:32:45 +08:00
Astha Verma 1da5d70034 fix(nimble): fix l2cap_coc throughput disconnect on esp32c2 2026-09-16 10:26:51 +05:30
Island 5ac710ee56 Merge branch 'feat/ble_smp_repairing_hardening_v6.0' into 'release/v6.0'
feat(ble/bluedroid): add Kconfig options for BLE re-pairing hardening (6.0)

See merge request espressif/esp-idf!52421
2026-09-15 14:12:07 +08:00
Island 602c154453 Merge branch 'feat/support_pawr_connect_evt_v6.0' into 'release/v6.0'
feat(ble/bluedroid): Support PAWR connection event (6.0)

See merge request espressif/esp-idf!51442
2026-09-15 14:12:05 +08:00
Jin Cheng b40d860987 fix(bt/bluedroid): fixed OOB read dring mSBC sync word check 2026-09-15 09:34:13 +08:00
Wang Meng Yang 50b9a4b19e Merge branch 'fix/bt_hfp_v6.0' into 'release/v6.0'
fix(bt_hfp): Fix some bugs in hfp (v6.0)

See merge request espressif/esp-idf!52750
2026-09-15 09:30:43 +08:00
linruihao a3fa33aad3 fix(bt/bluedroid): enable sniff power management for PBAP client 2026-09-14 10:19:17 +08:00
Shreeyash Bhakare ec250befd6 fix(nimble): Send Prepare Write Request before Execute Write in write long with zero-length data 2026-09-11 14:57:16 +05:30
hejiaxin f43561e692 fix(bt_hfp): Fix some bugs in hfp
- Fix hfp callback data length
- Fix the solution of unknown AT command
2026-09-11 17:25:51 +08:00
Rahul Tank 8da0b7af1f Merge branch 'bugfix/nimble_issues_08092026_v6.0' into 'release/v6.0'
fix few nimble issues 08092026 (v6.0)

See merge request espressif/esp-idf!52601
2026-09-11 14:20:57 +05:30
Island 0d25ea96d7 Merge branch 'feat/opt_prefer_bond_device_when_evicting_overflow_bonds_v6.0' into 'release/v6.0'
fix(bt/bluedroid): prefer disconnected peers when evicting overflow bonds (6.0)

See merge request espressif/esp-idf!52610
2026-09-10 20:50:40 +08:00
Island ba6bbdeb41 Merge branch 'bugfix/fix_bluedroid_find_info_format_mismatch_v6.0' into 'release/v6.0'
fix(ble/bluedroid): restore find info PDU stop on UUID format mismatch (6.0)

See merge request espressif/esp-idf!52080
2026-09-10 20:50:30 +08:00
Rahul Tank 768198540a Merge branch 'bugfix/hardware_error_assert_v6.0' into 'release/v6.0'
fix(nimble): Add hardware error event handling as normal event (v6.0)

See merge request espressif/esp-idf!52553
2026-09-10 17:33:50 +05:30
Astha Verma 5048d40e1b fix(nimble): Fix nimble HID service discovery 2026-09-09 14:09:04 +05:30
Zhang Hai Peng a7e56b0fac fix(bt/bluedroid): prefer disconnected peers when evicting overflow bonds
When the bond list is full, drop the oldest disconnected device instead
of the oldest NVS entry, and allow a per-bond except flag so selected
devices are never auto-removed.


(cherry picked from commit bf86892eef)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-09-09 14:25:55 +08:00
Rahul Tank 16cd970a43 Merge branch 'bugfix/fix_coex_crash_v6.0' into 'release/v6.0'
fix(nimble): Prevent crash in deinit when host init was not completed (v6.0)

See merge request espressif/esp-idf!52565
2026-09-09 11:15:32 +05:30
Wang Meng Yang 2441aff81d Merge branch 'bugfix/bta_disable_not_run_v6.0' into 'release/v6.0'
fix(bt/bluedroid): fixed BTA event dispatch race during module disable (v6.0)

See merge request espressif/esp-idf!51975
2026-09-09 11:39:09 +08:00
Rahul Tank 4cb6a3f218 fix(nimble): Prevent crash in deinit when host init was not completed 2026-09-08 15:35:29 +05:30
Rahul Tank 1e8fd755ad fix(nimble): Add hardware error event handling as normal event 2026-09-08 12:10:53 +05:30
Rahul Tank 454b29f257 fix(nimble): Fix for BLERP attack 2026-09-07 12:29:32 +05:30
Rahul Tank abd362c657 fix(nimble): Avoid NULL proc dereference in GATT client procedures 2026-09-06 09:44:45 +05:30
Wang Meng Yang 8d9613b259 Merge branch 'bugfix/delete_unused_avrcp_rcb_v6.0' into 'release/v6.0'
fix(bt/bluedroid): delete the unused AVRCP acceptor RCB when A2DP open fails (v6.0)

See merge request espressif/esp-idf!52413
2026-09-06 12:08:39 +08:00
Wang Meng Yang 70d938445d Merge branch 'fix/aireview_pbap_v6.0' into 'release/v6.0'
fix(bt_pbap): Fix some bugs in bluedroid PBAP (v6.0)

See merge request espressif/esp-idf!51728
2026-09-06 11:26:03 +08:00
Wang Meng Yang d5f9b93781 Merge branch 'change/refactor_hidh_datapath_v6.0' into 'release/v6.0'
Change/refactor hidh datapath[backport v6.0]

See merge request espressif/esp-idf!51279
2026-09-06 11:24:27 +08:00
Wang Meng Yang a9ad41e428 Merge branch 'bugfix/a2dp_api_init_check_v6.0' into 'release/v6.0'
fix(bt): Fix compatibility with A2DP API legacy usage methods (v6.0)

See merge request espressif/esp-idf!51328
2026-09-06 11:20:08 +08:00
Wang Meng Yang 06a411f81a Merge branch 'fix/aireview_obex_v6.0' into 'release/v6.0'
fix(bt_obex): fix some bugs in bluedroid obex (v6.0)

See merge request espressif/esp-idf!52005
2026-09-06 11:18:52 +08:00
Wang Meng Yang 2cf3ad6d31 Merge branch 'fix/bt_memory_v6.0' into 'release/v6.0'
fix(bt_memory): Reduce memory usage in transfer (v6.0)

See merge request espressif/esp-idf!52276
2026-09-06 11:16:58 +08:00
Rahul Tank c0b30a11db Merge branch 'bugfix/fix_stale_conn_cccd_v6.0' into 'release/v6.0'
fix(nimble): fix crash on disconnect due to stale per-connection CCCD pool (v6.0)

See merge request espressif/esp-idf!51951
2026-09-04 14:42:22 +05:30
Fu Hanxi 14297ada26 Merge branch 'ci/apply-common-scripts-v6.0' into 'release/v6.0'
ci: apply common-scripts refactor (v6.0)

See merge request espressif/esp-idf!50991
2026-09-04 09:33:06 +02:00
Rahul Tank a64ac3a8f6 fix(nimble): fix crash on disconnect due to stale per-connection CCCD pool 2026-09-04 12:17:48 +05:30
hejiaxin 340ce2b338 fix(bt_pbap): Fix some bugs in bluedroid PBAP
- Add sdp_seq to avoid p_ccb being free during sdp
- Changed some BTA_Pba functions to return non-void value
- Improve error catching and report
- Refactor bta_pba_client_response to avoid UAF problem
- Rearrange btc_pba_client init flag to avoid some disturbing bug
2026-09-04 11:55:05 +08:00
hejiaxin b2c98e72cd fix(bt_avrcp): size some AVRC command buffers 2026-09-04 11:51:39 +08:00
Zhi Wei Jian 2bada5b678 feat(ble/bluedroid): reject LE re-pairing that weakens an existing bond
Add smp_repairing_is_allowed() behind BT_BLE_SMP_HARDENED_REPAIRING so a
peer cannot replace an existing bond with one that has less MITM
protection, no Secure Connections, or a shorter key. Compare a preceding
Security Request against the pairing command AuthReq, not the
association-model result, and always allow first pairing.

A refusal keeps the stored bond. Pairing-failure erase is split by link
role: default is erase as Central and keep as Peripheral.

Closes BLERP (NDSS 2026) V3, V4 and V6.


(cherry picked from commit 88ea45be73)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-09-04 11:03:52 +08:00
Zhi Wei Jian 6b9b3d969e fix(ble/bluedroid): harden LE bond handling across encryption
Keep the existing bond until the new pairing is encrypted, and on encryption
failure drop the link instead of clearing keys. Recovering from a peer that
really deleted the bond is opt-in through BT_BLE_SMP_UNBOND_ON_KEY_MISSING.

Closes BLERP (NDSS 2026) V5, and stops an unauthenticated Pairing Request
from dropping the stored keys (V2 exploitation).


(cherry picked from commit f864615d7d)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-09-04 11:03:52 +08:00
ShenWeilong 3dbbafbbb3 fix(bt): fixed mempool deinit crash issue 2026-09-04 11:00:59 +08:00
hejiaxin 4226c1fdd4 fix(bt_obex): fix some bugs in bluedroid obex
- fix goepc wait state switch
- fix psm unbind's mismatch
- fix some resources leak
- fix goep connection's incorrect ternimation when congesting
- Add some NULL ptr check
2026-09-04 10:20:04 +08:00
Matteo Sandrin ffa442cb5d fix(bt/bluedroid): delete the unused AVRCP acceptor RCB when A2DP open fails 2026-09-04 10:07:55 +08:00
yangfeng 9905ffe7f5 fix(bt): Fix compatibility with A2DP API legacy usage methods
- Modify the timing of API calls in the A2DP example
- Closes https://github.com/espressif/esp-idf/issues/18786
2026-09-04 10:02:48 +08:00
liqigan 822f1617bf change(bt/bluedroid): Used dynamic osi event to reduce lock cost 2026-09-04 09:41:19 +08:00
zhanghaipeng 6d23cb7278 docs(bt): clarify Bluedroid GATT signed write API comments
Correct misleading CHAR_PROP_BIT_AUTH wording and document CSRK-based
signed write usage for server permissions and client write APIs.
2026-09-04 09:40:32 +08:00
zhanghaipeng ad5a7d778e fix(ble/bluedroid): allow osi_event re-post during POSTING window
Do not reject osi_thread_post_event() when only POSTING is set.
QUEUED already prevents double-queueing; rejecting POSTING caused
HCI downstream lost wakeup. Add generic osi_event and hci downstream
diagnostics for post failures.
2026-09-04 09:40:32 +08:00
liqigan 1dcaf24129 fix(bt/bluedroid): Fixed HID host reconnection bug and enabled load HID devices
Closes https://github.com/espressif/esp-idf/issues/18335
2026-09-04 09:32:58 +08:00
liqigan 6c27057d67 change(bt/bluedroid): Refactored HCI ACL datapath 2026-09-04 09:32:58 +08:00