Commit Graph
5478 Commits
Author SHA1 Message Date
Zhi Wei Jian 3deee8d3e2 docs(ble/bluedroid): note ISO BIG HCI alloc failure not checked
(cherry picked from commit 34b59d30ae)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 12:04:08 +08:00
Zhi Wei Jian e2735b1bb5 fix(ble/bluedroid): fix direct-connect cleanup and adv bounds
(cherry picked from commit 82e71c1767)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 12:04:08 +08:00
Zhi Wei Jian 1330f558e1 fix(ble/bluedroid): validate BLE confirm/OOB and sec-check device
(cherry picked from commit 93ab11d564)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 12:04:07 +08:00
Zhi Wei Jian fab68dc82f fix(ble/bluedroid): validate SMP pair-fail reason and OOB device
(cherry picked from commit 98efe02385)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 12:04:07 +08:00
Zhi Wei Jian d2f755b735 fix(ble/bluedroid): route ATT indication-conf timeout separately
(cherry picked from commit 6c3267ee84)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 12:04:07 +08:00
Zhi Wei Jian 12b6beff43 fix(ble/bluedroid): validate ATT PDU sizes
(cherry picked from commit bb00b9817d)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 12:04:06 +08:00
Zhi Wei Jian 7637a46169 fix(ble/bluedroid): re-lookup GATT TCB after enc-complete callback
(cherry picked from commit 37562af0ea)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 12:04:06 +08:00
Zhi Wei Jian b7fde3a96c fix(ble/bluedroid): fix GATT long read and Service Changed CCC
(cherry picked from commit 4ce692ac0c)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 12:04:05 +08:00
Zhi Wei Jian 0b515686dd fix(ble/bluedroid): validate GATT client discovery handles
(cherry picked from commit ac35ae6f2d)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 12:04:05 +08:00
Zhi Wei Jian b0e64dbbd5 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:05 +08:00
Zhi Wei Jian af043ccffa 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:04 +08:00
Zhi Wei Jian c48e5a30e9 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:04 +08:00
Zhi Wei Jian e7f6bf115e 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:04 +08:00
Zhi Wei Jian a9c2816caf 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:03 +08:00
Zhi Wei Jian de2578d083 fix(ble/bluedroid): add GATT resource-cleanup helpers
(cherry picked from commit b83327f3ca)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-07-14 12:03:58 +08:00
Zhi Wei Jian 95bd892dba 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:02 +08:00
Island 785419057e Merge branch 'fix/ble_mesh_fixed_issues_v5.4' into 'release/v5.4'
Resolve reported BLE mesh stack issues (5.4)

See merge request espressif/esp-idf!50405
2026-07-14 10:16:47 +08:00
Rahul Tank a3aeccbed4 fix(nimble): Fixes for AI reported issues 2026-07-07 16:28:48 +05:30
Luo Xu 7e3e04402a 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:02 +08:00
Luo Xu 4a8f62c175 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:00 +08:00
Luo Xu a5cfdef4ed 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:43:59 +08:00
Luo Xu eb8962ae8a 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:43:59 +08:00
Luo Xu 4a3d4756e5 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:43:58 +08:00
Luo Xu 65f798fc3f 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:43:57 +08:00
Luo Xu e59dc7cc2f fix(ble_mesh): reject invalid chunk size
(cherry picked from commit 35cd10fbdf)

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

Co-authored-by: luoxu <luoxu@espressif.com>
2026-07-06 17:43:55 +08:00
Luo Xu 6723edeb5c 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:43:54 +08:00
Luo Xu 2fed52c729 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:43:54 +08:00
Jiang Jiang Jian 5fb8206bd6 Merge branch 'fix/ble_mesh_disable_adv_pkt_discard_log_v5.4' into 'release/v5.4'
fix(ble_mesh): Disable warning logging when advertising packets are discarded (5.4)

See merge request espressif/esp-idf!50165
2026-07-06 15:13:23 +08:00
Island f14e94bb83 Merge branch 'fix/ble-log-64-bit-io-setup-support_v5.4' into 'release/v5.4'
fix(ble_log): use BIT64 over BIT to support 64-bit IO setup (5.4)

See merge request espressif/esp-idf!50329
2026-07-06 12:21:09 +08:00
Wang Meng Yang 36e78269b8 Merge branch 'bugfix/bbp_issues_v5.4' into 'release/v5.4'
Bugfix/bbp issues v5.4

See merge request espressif/esp-idf!50191
2026-07-06 11:16:44 +08:00
Rahul Tank b5b35c0d25 fix(nimble): Defer Events / ATT related information from stack
Defer Events/ ATT related GAP events from stack until connection
 event is sent to GAP layer
2026-07-03 11:19:43 +05:30
Zhou Xiao 8db6befe08 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:04:55 +08:00
Zhou Xiao 48f98395f8 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:29 +08:00
Zhou Xiao 8d3d04c60a 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:28 +08:00
Wang Meng Yang 1ce3dfb50c Merge branch 'bugfix/ai_review_btu_common_v5.4' into 'release/v5.4'
fix: Fix the critical issues of btu and bt_common from AI review report (v5.4)

See merge request espressif/esp-idf!50124
2026-06-30 19:24:27 +08:00
Wang Meng Yang d3d0963239 Merge branch 'bugfix/ai_review_a2dp_v5.4' into 'release/v5.4'
fix(bt): Fix the critical issues related to A2DP from AI review report (v5.4)

See merge request espressif/esp-idf!50130
2026-06-30 19:23:54 +08:00
luoxu 316a6cd50f fix(ble_mesh): Disable warning logging when advertising packets are discarded 2026-06-30 17:00:43 +08:00
Jin Cheng 66be8af7ee fix(bt/bluedroid): fixed possible OOB read/write in process_l2cap_cmd 2026-06-30 15:10:44 +08:00
Island 416cd10dd5 Merge branch 'bugfix/fix_bluedroid_static_random_conn_rpa_v5.4' into 'release/v5.4'
fix(ble/bluedroid): skip identity conversion for static random direct connect (5.4)

See merge request espressif/esp-idf!50083
2026-06-30 10:24:53 +08:00
Island 6d69f146be Merge branch 'bugfix/fix_bluedroid_rpa_whitelist_conn_v5.4' into 'release/v5.4'
Fix connection failure when using RPA with whitelist filtering(ESP32) (5.4)

See merge request espressif/esp-idf!50089
2026-06-30 10:23:14 +08:00
yangfeng f164a75569 fix(bt): Fix the critical issues related to A2DP from AI review report
AVDT:
- Roll back CCB allocation when cmd/rsp queue creation fails
- Free media packet on invalid handle in AVDT_WriteReqOpt
- Zero-init timeout failure message before GETCAP callback
- Initialize lcid_tbl to 0xFF to avoid mapping to tc_tbl[0]
BTA/AVRCP:
- Use size_t for AVRC message copy buffer allocation
- Allocate before register in BTA_AvEnable
- Guard BTA_AvRegister callback when enable never completed
- Remove invalid free of inline Cover Art image_descriptor
A2DP BTC/API:
- Default g_a2dp_on_deinit to true before profile init
- Add shutdown state check in btc_a2dp_sink_shutdown
- Guard A2DP source timer against freed dynamic local param
2026-06-29 15:06:38 +08:00
yangfeng 3437c34c17 fix: Fix the critical issues of btu and bt_common from AI review report
- advance connect queue on synchronous connect_cb failure
- lock bta_alarm_hash_map in all BTA timer APIs
- free controller params after stack disable; cleanup on init fail
- handle BTE_InitStack failure and signal init future
- validate HCI remote name event length before parse
- drop stale L2CAP quick-timer alarm events
2026-06-29 14:49:19 +08:00
Rahul Tank 5770e5bb97 Merge branch 'bugfix/fix_gatt_crash_v5.4' into 'release/v5.4'
fix(nimble): Add npl locks to avoid race condition (v5.4)

See merge request espressif/esp-idf!50068
2026-06-29 10:23:00 +05:30
zhanghaipeng fac1e10fb8 fix(bt): update ESP32 libbtdm_app.a to 4a0f94d5
- Fix connection failure when using RPA with whitelist filtering
- Fix disconnect with reason 0x08 during full scan
- Fix peer RPA resolution failure when advertising with a local identity address
2026-06-29 10:43:14 +08:00
Jin Cheng e2ddb61266 fix(bt/controller): fixed several BR/EDR controller bugs found by WVT regression tests on ESP32 2026-06-29 10:43:10 +08:00
Zhi Wei Jian 1b340fe82b feat(ble/bluedroid): add CS Security Requirements host support (Core 6.3)
(cherry picked from commit 919622c01c)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-26 20:37:44 +08:00
Zhi Wei Jian aed8603a42 feat(ble/bluedroid): add LE UTP host support (Core 6.2)
(cherry picked from commit 3844e24207)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-26 20:37:44 +08:00
Zhi Wei JianandCursor 661e297e87 feat(ble/bluedroid): add Shorter Connection Intervals host support (Core 6.2)
Co-authored-by: Cursor <cursoragent@cursor.com>


(cherry picked from commit 2a8a96d650)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-26 20:37:44 +08:00
Zhi Wei Jian c72a639097 feat(ble/bluedroid): add LL Extended Feature Set host support (Core 6.0)
(cherry picked from commit d568f2f151)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-26 20:37:44 +08:00