Commit Graph
6026 Commits
Author SHA1 Message Date
Zhi Wei Jian a0916503a7 fix(ble/bluedroid): cap Read By Type length and free failed service decl
(cherry picked from commit 27ff0cf8c7)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 12:04:34 +08:00
Zhi Wei Jian d8d4355bab fix(ble/bluedroid): guard GATT database hash and serialization
(cherry picked from commit 995c1508e8)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 12:04:34 +08:00
Zhi Wei Jian a74847dc51 fix(ble/bluedroid): fix GATT server busy errors and sr_cmd handling
(cherry picked from commit f86739b03d)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 12:04:34 +08:00
Zhi Wei Jian b27bc52778 fix(ble/bluedroid): fix GATT teardown and service-change flow
(cherry picked from commit 0645ba469d)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 12:04:33 +08:00
Zhi Wei Jian c7b84af53a fix(ble/bluedroid): fix GATT service lifecycle leaks
(cherry picked from commit ac93d94958)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 12:04:33 +08:00
Zhi Wei Jian d43f6a78ef fix(ble/bluedroid): add GATT resource-cleanup helpers
(cherry picked from commit b83327f3ca)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 12:04:33 +08:00
Zhi Wei Jian 7509dd6460 feat(ble/bluedroid): Support bluedroid LE COC and EATT features
(cherry picked from commit 83f0831c53)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 11:56:08 +08:00
Zhang Hai Peng a6404dcf8d fix(ble/bluedroid): downgrade numeric comparison log to warning
(cherry picked from commit 72a49ed53b)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-07-14 10:37:22 +08:00
Zhang Hai Peng f4c2b75897 fix(ble/bluedroid): preserve ext adv state when set params fails
Only update extend_adv_cb after HCI Set Extended Advertising
Parameters succeeds, so a failed update does not corrupt cached
legacy_pdu and related fields used by adv data validation.


(cherry picked from commit 31bd80fee8)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-07-14 10:37:21 +08:00
Zhang Hai Peng 169bf6975b fix(ble/bluedroid): reject invalid ATT error code 0x00 on client
Map received error reason 0x00 to GATT_UNKNOWN_ERROR so the client
does not report GATT_SUCCESS with zero-length data on malformed errors.


(cherry picked from commit 1b6f9380f4)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-07-14 10:36:38 +08:00
Zhang Hai Peng be95975fee fix(ble/bluedroid): use sr_cmd status for GATT server error rsp
When sending an ATT error response after a failed server operation,
use p_tcb->sr_cmd.status instead of the last app callback status so
invalid error code 0x00 is not sent to the peer.


(cherry picked from commit 4c0488d92a)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-07-14 10:36:36 +08:00
Zhang Hai Peng 96b27367a1 fix(ble/bluedroid): match read-multiple-var responses by handle
(cherry picked from commit 979c7dc567)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-07-14 10:36:34 +08:00
Zhang Hai Peng 2bb2f01dd3 fix(ble/bluedroid): match read-multiple responses by handle
Read Multiple may mix stack auto-responses with app async responses,
so multi_rsp_q order can differ from the request handle order. Look up
each response by handle (with occurrence for duplicates) instead of
walking the queue by index, and treat opcode-only buffers as empty.


(cherry picked from commit f91a41510c)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-07-14 10:36:33 +08:00
Jin Cheng e4c999e891 fix(bt/bluedroid): fixed OOB read in PBAP app parameter parsing
Closes SEC-713
2026-07-09 15:44:57 +08:00
Jin Cheng b6a8e896e7 fix(bt/bluedroid): fixed stuck sec_state on authention HCI command send failure
Closes SEC-1164
2026-07-09 15:44:57 +08:00
Jin Cheng 02841cdf50 fix(bt/bluedroid): fixed HID host slot leak on local VUP ACL drop
Closes SEC-1169
2026-07-09 15:44:57 +08:00
Jin Cheng 81c8d1b999 fix(bt/bluedroid): fixed NULL dereference in remote legacy authentication handler
Closes SEC-1143
2026-07-09 15:44:57 +08:00
Jin Cheng a0ba14e55d fix(bt/bluedroid): fixed wrong link key flag cleared on legacy BR/EDR authentication failure
Stale bond trust state cound remain after authenticaion failure, causing
incorrect bond status and link key auto-reply behavior.

Closes SEC-1153
2026-07-09 15:44:57 +08:00
Luo Xu d75f7448e5 fix(ble_mesh): re-check scan dev-found cb before scan-rsp invocation
(cherry picked from commit 9a3a767824)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:42 +08:00
Luo Xu 1b68511f89 fix(ble_mesh): comment out logs containing sensitive keys
(cherry picked from commit 781d6b2314)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:41 +08:00
Luo Xu 0e4e6ba61f fix(ble_mesh): validate PB-ADV start segment length
(cherry picked from commit 912ec8dc62)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:40 +08:00
Luo Xu 8d998f7fc1 fix(ble_mesh): Reset reassembly buffer at start of each transaction
The reassembly buffer must be reset to its origin at the beginning of every
transaction. prov_msg_recv() pulls the PDU type byte (advancing buf->data by
one) and nothing restores it between transactions. Without this reset,
buf->data drifts forward by one byte per received PDU, causing the segment-0
memcpy to write past the end of the statically allocated rx buffer
(PROV_RX_BUF_SIZE), and the XACT_SEG_DATA() offsets used for continuation
segments to be skewed by the accumulated drift.


(cherry picked from commit 2c4acaa2aa)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:39 +08:00
Luo Xu c92fb5c2cb fix(ble_mesh): fix DFD client message parsing and encoding bugs
Fix multiple wire-format and robustness issues in the DFD client
(dfd_cli.c):

- handle_capabilities: read oob_retrieval_supported as u8 instead of
  le32. The server encodes a single byte; le32 over-consumed 3 bytes
  of the URL scheme list and could over-read the buffer.
- handle_upload_status: extract upload_progress from bits 0-6 (& 0x7F)
  and upload_type from bit 7 (>> 7), matching the server encoding
  (progress | BIT(7)). The previous >>1 / &0x01 returned wrong values,
  mis-classified in-band vs OOB, and falsely rejected valid OOB
  messages with high progress.
- handle_dfd_status: correct the transfer-mode byte layout to
  trans_mode bits 0-1, update_policy bit 2, RFU bits 3-7 (previously
  read bits 6-7 / 5), and fix the RFU mask to 0xF8. Now matches the
  struct bitfield definition and the DFD server.
- handle_dfd_status: report status+phase and return early when
  buf->len == 0 (IDLE phase) instead of pulling 10 absent bytes.
- bt_mesh_dfd_cli_distribution_start: encode trans_mode/update_policy
  into bits 0-2 so the server decodes them correctly.
- handle_receiver_list: validate buf->len >= entries_cnt * 5 before
  the loop, and handle entries_cnt == 0 without relying on calloc(0).
- handle_receiver_status: pass the status value (not the whole union)
  to the %d log format, fixing undefined behavior.
- dfd_client_recv_status: drop the dead BLE_MESH_DFD_OP_CAPABILITIES_GET
  case (a client-send opcode) from the receive switch.
- bt_mesh_dfd_cli_receivers_add: widen msg_length to uint32_t to avoid
  uint16_t overflow that bypassed the PDU size guard; add a NULL check
  for the receivers array.
- bt_mesh_dfd_cli_distribution_upload_oob_start: return -EINVAL
  instead of -1 for consistency with the rest of the file.


(cherry picked from commit 43137475e1)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:38 +08:00
Luo Xu a475b0144e fix(ble_mesh): added max dfd srv count limit
(cherry picked from commit 781218cb62)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:37 +08:00
Luo Xu d5555a086c fix(ble_mesh): reject invalid chunk size
(cherry picked from commit 35cd10fbdf)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:37 +08:00
Luo Xu 5a57501543 fix(ble_mesh): fixed invalid disconnect handler wrote
(cherry picked from commit 52cfff707f)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:36 +08:00
Luo Xu 3821e89347 fix(ble_mesh): fixed BLE-Mesh NimBLE extended-adv reassembly buffer overflow on COMPLETE fragment
(cherry picked from commit 1b22467f63)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:34 +08:00
Luo Xu be19bf858d fix(ble_mesh): fixed BLE-Mesh GATTS read-callback error
(cherry picked from commit 00adfb3cbc)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:44:34 +08:00
Jiang Jiang Jian 76f1151d72 Merge branch 'fix/ble-log-64-bit-io-setup-support_v6.1' into 'release/v6.1'
fix(ble_log): use BIT64 over BIT to support 64-bit IO setup (6.1)

See merge request espressif/esp-idf!50332
2026-07-06 15:51:27 +08:00
Rahul Tank e44969a390 fix(nimble): Fix ble_chan_sound_reflector compilation issue 2026-07-06 07:52:43 +05:30
Jiang Jiang Jian 07c6d5eacf Merge branch 'change/ble_update_lib_20260610_v6.1' into 'release/v6.1'
change(ble): [AUTO_MR] 20260610 - Update ESP BLE Controller Lib (6.1)

See merge request espressif/esp-idf!50227
2026-07-03 21:52:31 +08:00
Jiang Jiang Jian d35c053e92 Merge branch 'idf/ble_iso_sec_fixes_v6.1' into 'release/v6.1'
Idf/ble iso sec fixes (v6.1)

See merge request espressif/esp-idf!50231
2026-07-03 20:30:21 +08:00
Jiang Jiang Jian 25c546c1a8 Merge branch 'bugfix/bbp_issues_v6.1' into 'release/v6.1'
Bugfix/bbp issues v6.1

See merge request espressif/esp-idf!50188
2026-07-03 20:29:55 +08:00
Jiang Jiang Jian 7089584a34 Merge branch 'idf/ble_audio_4.4.1_v6.1' into 'release/v6.1'
feat(ble_audio): Support Zephyr LE Audio v4.4.1 (v6.1)

See merge request espressif/esp-idf!50187
2026-07-03 20:28:32 +08:00
Jiang Jiang Jian 901b57c86c Merge branch 'feature/added_qa_related_vs_cmd_v6.1' into 'release/v6.1'
feat(ble): Updated libble to 6bbfb64 on ESP32-S31 and ESP32-H4 (6.1)

See merge request espressif/esp-idf!50270
2026-07-03 20:02:49 +08:00
Jin Chenandzhaoweiliang e439903965 fix(ble): fixed reconfig uart pin build error on ESP32-S31
(cherry picked from commit e92c6f7c4c)

Co-authored-by: zhaoweiliang <zhaoweiliang@espressif.com>
2026-07-03 14:35:46 +08:00
Zhou Xiao 4432f11023 fix(ble_log): use BIT64 over BIT to support 64-bit IO setup
(cherry picked from commit a2876d304e)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-07-03 12:05:01 +08:00
ShenWeilong ef702ca257 feat(ble): Updated libble to 6bbfb64 on ESP32-S31 and ESP32-H4 2026-07-01 21:06:50 +08:00
Sudeep Mohanty 93b5785aba fix(bt): declare esp_event as a private requirement
bt sources include esp_wifi_types.h via esp_blufi_api.h, which
transitively includes esp_event_base.h from the esp_event component.
2026-07-01 19:59:05 +08:00
Liu Linyan ec4aa2fa75 fix(ble_iso): Fix null dereference may happened during BIG/CIG creation 2026-07-01 11:59:45 +08:00
Linyan Liu 5aa4edacdb fix(ble_iso): Fix ISO SDU header pulled without minimum length check 2026-07-01 11:52:34 +08:00
Zhou Xiao 89a4da5083 change(ble): [AUTO_MR] Update lib_esp32c6 to a6519790
(cherry picked from commit 226a0483b1)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-07-01 10:35:37 +08:00
Zhou Xiao 9af79c18e3 change(ble): [AUTO_MR] Update lib_esp32c5 to a6519790
(cherry picked from commit a43358587c)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-07-01 10:35:37 +08:00
Zhou Xiao 4e625df6ec change(ble): [AUTO_MR] Update lib_esp32h2 to a6519790
(cherry picked from commit 8a744e8e93)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-07-01 10:35:36 +08:00
Jiang Jiang Jian f71890ccec Merge branch 'bugfix/ai_review_btu_common_v6.1' into 'release/v6.1'
fix: Fix the critical issues of btu and bt_common from AI review report (v6.1)

See merge request espressif/esp-idf!50121
2026-06-30 17:37:34 +08:00
luoxu 942d513c27 fix(ble_mesh): Disable warning logging when advertising packets are discarded 2026-06-30 16:59:58 +08:00
Liu Linyan 9b415a7d1f feat(ble_audio): Support Zephyr LE Audio v4.4.1 2026-06-30 15:17:24 +08:00
Jin Cheng 85d56bcd26 fix(bt/bluedroid): fixed possible OOB write in btc_a2dp_sink_handle_inc_media 2026-06-30 14:42:00 +08:00
Jin Cheng 1f3f53d226 fix(bt/bluedroid): fixed possible OOB read/write in process_l2cap_cmd 2026-06-30 14:41:52 +08:00
Jiang Jiang Jian 24d35f4c04 Merge branch 'bugfix/ai_review_a2dp_v6.1' into 'release/v6.1'
fix(bt): Fix the critical issues related to A2DP from AI review report (v6.1)

See merge request espressif/esp-idf!50127
2026-06-30 14:24:19 +08:00