Commit Graph

31433 Commits

Author SHA1 Message Date
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
c8d74d975a Merge branch 'bugfix/queue_att_cmd_v5.4' into 'release/v5.4'
feat(nimble): Defer all ATT commands until connection event is sent to GAP layer (v5.4)

See merge request espressif/esp-idf!48179
2026-07-03 16:07:00 +05:30
Jiang Jiang Jian
07f6e7d4a3 Merge branch 'backport/backport_some_wifi_changes_260701_v5.4' into 'release/v5.4'
backport/backport_some_wifi_changes_260701_v5.4(backport v5.4)

See merge request espressif/esp-idf!50263
2026-07-03 16:47:40 +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
yinqingzhao
bbfb2840f5 fix(wifi): comment out functions from ld files 2026-07-02 10:16:23 +08:00
yinqingzhao
e0f5dd572c fix(wifi): optimizations of csa procedure and keep alive mechanism 2026-07-01 20:10:08 +08:00
yinqingzhao
ddec495cf7 fix(wifi): fix scheduling issue when tasks have the same priority as the Wi-Fi task 2026-07-01 17:35:10 +08:00
yinqingzhao
d51b8c26f4 fix(phy): fix still put multiple phy init date bin into flash when CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN_EMBED is enabled 2026-07-01 17:33:55 +08:00
yinqingzhao
302e636a13 feat(phy): support change multiple phy init bin path 2026-07-01 17:30:44 +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
morris
582e0d5c1d Merge branch 'refactor/jpeg_encoder_example_v5.4' into 'release/v5.4'
fix(jpeg): broken link in the example readme (v5.4)

See merge request espressif/esp-idf!50142
2026-06-30 16:18:05 +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
morris
8c731d258b doc(jpeg): fix broken link in the example readme 2026-06-30 13:49:22 +08:00
morris
091b0aecac Merge branch 'fix/spi_buslock_multi_dev_acq_release_issue_v5.4' into 'release/v5.4'
fix(esp_hw_support): fixed spi buslock multi dev acq/release logic issue (v5.4)

See merge request espressif/esp-idf!49172
2026-06-30 11:48:17 +08:00
morris
ca4758cd00 Merge branch 'bugfix/sdio_slave_buffer_size_limit_v5.4' into 'release/v5.4'
fix(sdio_slave): align buffer size checks with descriptor limits (v5.4)

See merge request espressif/esp-idf!49901
2026-06-30 11:33:47 +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
Jiang Jiang Jian
ba73879929 Merge branch 'bugfix/fix_smartconfig_stop_assert_issue_v5.4' into 'release/v5.4'
fix(wifi): added start check when calling smartconfig stop (v5.4)

See merge request espressif/esp-idf!49994
2026-06-29 16:27:45 +08:00
Jiang Jiang Jian
d4ae0eb41e Merge branch 'fix/disable_i2c_master_clk_while_hw_hop_processing_v5.4' into 'release/v5.4'
fix(esp_phy): check hw freq hop done before disabling common clock (v5.4)

See merge request espressif/esp-idf!48560
2026-06-29 15:12:07 +08:00
Jiang Jiang Jian
f553992912 Merge branch 'feat/optimize_154_debug_v5.4' into 'release/v5.4'
feat(802.15.4): avoid missing abort reason for multievents in 154 debug (v5.4)

See merge request espressif/esp-idf!50113
2026-06-29 15:08:43 +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
morris
4c6e7502b7 Merge branch 'fix/jpeg_over_size_v5.4' into 'release/v5.4'
fix(jpeg): Fix the jpeg size might exceed the buffer size (backport v5.4)

See merge request espressif/esp-idf!50030
2026-06-29 11:02:49 +08:00
zhuanghang
e2807d393e feat(802.15.4): avoid missing abort reason for multievents in 154 debug 2026-06-29 10:54:13 +08:00
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 Jian
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
Zhi Wei Jian
4812d74f48 feat(ble/bluedroid): add Frame Space Update host support (Core 6.0)
Co-authored-by: Cursor <cursoragent@cursor.com>


(cherry picked from commit 5372ce03a3)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-26 20:37:44 +08:00
Zhi Wei Jian
5cff20ac8f feat(ble/bluedroid): add DBAF host support (Core 6.0)
(cherry picked from commit e20d3f0197)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-06-26 20:37:44 +08:00
Zhang Hai Peng
ae071465e5 fix(ble/bluedroid): preserve HCI status on BLE 4.2 GAP failures
Return BTM_HCI_ERROR | hci_status from legacy BLE 4.2 GAP HCI command
paths instead of mapping failures to BTM_ILLEGAL_VALUE or
BTM_NO_RESOURCES. Add btm_ble_status_from_hci() helper and propagate
real status through scan start/stop completion callbacks.


(cherry picked from commit 47dd785a18)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:24:48 +08:00
Zhang Hai Peng
6d33df6d6b feat(ble/bluedroid): Optimize Bluedroid memory usage
- Delete unused device records (~356B each)


(cherry picked from commit 7d1c0e9a32)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-06-26 20:24:27 +08:00