Commit Graph

42952 Commits

Author SHA1 Message Date
Euripedes Rocha
978e82ed9d Merge branch 'fix/sec-1129-l2tap-close-rollback_v5.3' into 'release/v5.3'
fix(esp_netif): roll back l2tap_close on semaphore/task create failure (SEC-1129) (v5.3)

See merge request espressif/esp-idf!51402
2026-08-04 07:00:21 +02:00
Luo Xu
d6eed489b0 feat(ble_log): mirror local compression headers
(cherry picked from commit ee732a4591)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-08-04 11:57:57 +08:00
Eric Wang
87b013936e fix(driver_spi): avoid NULL memcpy when private DMA buffer setup fails
Closes https://github.com/espressif/esp-idf/pull/18898
2026-08-04 11:25:21 +08:00
wanckl
d43de5fa7e fix(hw_support): spi buslock fix unregister dev api issue 2026-08-04 10:59:07 +08:00
Rahul Tank
9a36f17232 fix(nimble): Fixes for various NimBLE CVEs 2026-08-03 23:49:23 +05:30
Euripedes Rocha Filho
f5607d1737 fix(esp_netif): Avoid socket to stay in closing state in l2tap closing 2026-08-03 16:18:11 +02:00
Luo Xu
2d378a5563 fix(ble_mesh): align GATTS read/write response handling with ATT
bt_mesh_bta_gatts_cb did not always answer ATT Read/Write Requests:
- READ: on a callback error it only logged a warning and sent nothing; a
  0-byte read (Read Blob at an offset equal to the value length) also sent
  nothing, although it is a successful empty read.
- WRITE: on a callback error it sent nothing, and a partial/zero write was
  treated as success.
- Both: when the handle was not found or the attribute had no read/write
  callback, the request was silently dropped.

An ATT Request must always be answered:

- READ: len >= 0 is success -> Read Response (a 0-byte read yields an empty
  value); len < 0 -> ATT Error Response carrying the callback's error code
  (-len, since BLE_MESH_GATT_ERR(x) == -x). The copy length is clamped to
  the source buffer size as a defensive bound. If the handle is unknown or
  the attribute has no read callback, respond with INVALID_HANDLE /
  READ_NOT_PERMITTED.
- WRITE: when need_rsp is set, always reply. len == write length -> Write
  Response; otherwise (negative ATT error, partial write, or 0) -> ATT
  Error Response (the negative code, or UNLIKELY for partial/0). If the
  handle is unknown or the attribute has no write callback, respond with
  INVALID_HANDLE / WRITE_NOT_PERMITTED. Write Without Response still sends
  no response.

A non-success status passed to BTA_GATTS_SendRsp is turned into an ATT
Error Response by the GATT layer (gatt_sr_process_app_rsp ->
gatt_send_error_rsp).


(cherry picked from commit ed1f4de3a3)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-08-03 21:43:35 +08:00
Zhi Wei Jian
7eae05b8d9 fix(ble/bluedroid): Build LE event mask from host feature macros
(cherry picked from commit 68dff5d798)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-08-03 15:25:43 +08:00
Zhi Wei Jian
5b0f43d724 feat(ble/bluedroid): Support PAWR connection event
(cherry picked from commit 7da7fa42ac)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-08-03 15:25:43 +08:00
Chen Chen
86f1c6428e fix(hal): prevent overflow in fractional clock division
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 15:16:40 +08:00
Island
5a4288e8ff Merge branch 'fix/ble_log_compression_issue_on_windows_v5.3' into 'release/v5.3'
fix(bt): fix BLE log compression build on Windows (5.3)

See merge request espressif/esp-idf!51243
2026-08-03 11:31:23 +08:00
Island
b01be03a5a Merge branch 'feat/update_mesh_lib_to_supported_get_lib_ver_v5.3' into 'release/v5.3'
Feat/update mesh lib to supported get lib ver (5.3)

See merge request espressif/esp-idf!51170
2026-08-03 11:30:38 +08:00
Martin Vychodil
e0f8e5fcce Merge branch 'bugfix/idfci-12815-12072-timeout_v5.3' into 'release/v5.3'
fix(storage): mark storage pytest apps flaky in CI (v5.3)

See merge request espressif/esp-idf!51339
2026-08-02 16:40:32 +08:00
sonika.rathi
ada0e3e116 fix(storage): mark storage pytest apps flaky in CI 2026-07-31 08:57:28 +02:00
Akshat Agrawal
720ccfdc7e fix(nan): Fix bug bounty reported and discovered vulnerabilities in NAN Rx 2026-07-31 12:07:12 +05:30
harshal.patil
639e80169d refactor(esp_system): deduplicate ROM fast wake RTC digest reservation
The digest length and the condition that reserves it at the end of RTC RAM were
duplicated in seven places. Hold the reservation in a hidden Kconfig value that
is zero when the feature does not apply, so every consumer subtracts it
unconditionally, and derive ESP_SECURE_BOOT_DIGEST_LEN from it.
2026-07-31 11:23:26 +08:00
Island
3a52ac47a4 Merge branch 'fix/fix_some_ble_sleep_issues_v5.3' into 'release/v5.3'
Fix/fix some ble sleep issues (5.3)

See merge request espressif/esp-idf!51316
2026-07-31 11:10:32 +08:00
Rahul Tank
dc5e862c52 Merge branch 'bugfix/fix_pawr_conn_event_v5.3' into 'release/v5.3'
fix(nimble):  Deliver PAwR peripheral CONNECT via sync callback (v5.3)

See merge request espressif/esp-idf!51256
2026-07-30 20:39:02 +05:30
Rahul Tank
1f314eff3e fix(nimble): Deliver PAwR peripheral CONNECT via sync callback 2026-07-30 16:35:02 +05:30
zwx
4c9be53120 fix(openthread): fix null pointer deref, uninitialized struct, and unbounded strcpy in spinel/RCP code 2026-07-30 18:59:31 +08:00
hejiaxin
5b5e80c12a fix(bt_stack): Fix some critical bugs in classic_bt stack
related: obex, smp, pbap, sdp, rfcomm, stack_dm

- Deinit function doesn't delete connection when OBEX_DYNAMIC_MEMORY is on
- Union tGOEPC_DATA sometimes is free by osi_free in some cases when it contains mtu_id
- Add correct free and return solution after fail
- Fix symbol mistake in mod calculation
- Fix pointer-related UAF problems and memory free problems
- Fix buffer overflows and out-of-bounds access
- Fix infinite loops triggered by integer overflow wraparound
- Fix double free
- Change layer_specific usage to avoid heap overflow
- Add some NULL check for pointers
- Fix sdp_db free function
- Fix state table mismatch
2026-07-30 17:44:37 +08:00
sonika.rathi
5d28f27890 fix(nvs_flash): erase handle before delete on deinit 2026-07-30 11:19:53 +02:00
sonika.rathi
b3644c85ad fix(nvs_flash): delete leftover handles on partition deinit 2026-07-30 11:19:53 +02:00
Jiang Jiang Jian
df8ad67949 Merge branch 'bugfix/fix_espnow_data_rate_error_v5.3' into 'release/v5.3'
fix(wifi): fixed espnow data rate overridden by stale rate control (v5.3)

See merge request espressif/esp-idf!51305
2026-07-30 11:52:57 +08:00
Chen Jichang
e0f791598b fix(lcd): add color size check for i80 and boundary check for rgb 2026-07-30 11:42:33 +08:00
cjin
a509360467 feat(ble): added CONFIG_PM_SLP_IRAM_OPT to make sure cache error check 2026-07-30 10:20:00 +08:00
Island
7a1c86344a Merge branch 'change/ble_update_lib_20260717_v5.3' into 'release/v5.3'
change(ble): [AUTO_MR] 20260717 - Update ESP BLE Controller Lib (5.3)

See merge request espressif/esp-idf!50929
2026-07-30 10:08:02 +08:00
Sudeep Mohanty
d1d95b3255 test(ulp/lp_spi): improve test stability and add cleanup
Reset the LP SPI peripheral and GPIOs before and after every SPI case so
each test starts from a known-clean baseline, and gate the master on an
explicit slave-armed handshake so the master cannot clock the bus while
the slave is still in its arm prologue. Verify received data against the
expected pattern with bounded waits instead of merely logging it.

Add a dedicated LP SPI multi-device pytest for esp32p4 that runs the
retagged lp_core_spi cases, and tag the LP I2C case accordingly.
2026-07-29 15:34:54 +02:00
Sudeep Mohanty
4c95edacc7 fix(ulp/lp_spi): fix driver bugs and add bus deinit API
The LP SPI driver read and wrote the W0..W15 data buffer registers a
whole 32-bit word at a time, which overran the caller's buffer for
transfers whose length was not a multiple of four bytes and corrupted
the received data. Read and write the data buffer byte-granularly so
sub-word transfers no longer alias adjacent bytes.

The master transfer also programmed the shared bit-length register from
tx_length alone, truncating receive-longer-than-transmit transactions,
and always enabled MOSI even on read-only transfers, clocking out stale
buffer contents. Size each hardware transaction by max(tx_length,
rx_length) and gate MOSI/MISO on the corresponding buffer.

The slave path reused the master's single-shot flow, so it re-triggered
reg_update after preload (clocking out the previous transaction's data)
and offered no way for the caller to publish readiness before the master
started the clock. Split the slave transfer into an arm step that
preloads the buffer and starts the user phase, and a wait step that
blocks on TRANS_DONE and drains only the bytes the master actually
clocked in, tracked in software since reg_usr is not a reliable busy
indicator in slave mode.

Set the LP IO direction for the SPI pads, add
lp_core_lp_spi_bus_deinit() to release the LP GPIO pins, and reset the
LP SPI peripheral at bus initialization so a stale configuration from a
previous run cannot leak into the next.
2026-07-29 15:34:29 +02:00
morris
50967d2dfd Merge branch 'feat/sec_esp_drivers_v5.3' into 'release/v5.3'
fix(drivers): harden multiple peripheral drivers against local DoS and memory corruption (v5.3)

See merge request espressif/esp-idf!50561
2026-07-29 19:23:15 +08:00
morris
faa0bd021c Merge branch 'bugfix/ppa_buffer_oob_v5.3' into 'release/v5.3'
fix(ppa): add checks for input to avoid any OOB access (v5.3)

See merge request espressif/esp-idf!51142
2026-07-29 18:55:37 +08:00
zhangyanjiao
829d43c9ef fix(wifi): fixed espnow data rate overridden by stale rate control 2026-07-29 17:52:35 +08:00
Rahul Tank
76fa1483ab Merge branch 'feat/sbom_changes_v5.3' into 'release/v5.3'
fix(nimble): update sbom file with cve details (v5.3)

See merge request espressif/esp-idf!51184
2026-07-29 15:03:51 +05:30
Jin Cheng
28b00497ee fix(bt/bluedroid): fixed incorrect eSCO packet type validation under secure connection mode in BlueDroid 2026-07-29 17:30:36 +08:00
hejiaxin
95b9d9c961 fix(bt): Fix some bug in stm_sco.c
- Memory safety
- State machine & logic integrity
- Resource leaks
- Edge cases check
2026-07-29 17:30:36 +08:00
Alexey Gerenkov
dd77984ee6 Merge branch 'fix/cxx-tls-destructors_v5.3' into 'release/v5.3'
fix(cxx): fix TLS classes destructor call (v5.3)

See merge request espressif/esp-idf!34209
2026-07-29 16:17:58 +08:00
Rahul Tank
2ccfcc7066 fix(nimble): update sbom file with cve details 2026-07-29 12:53:31 +05:30
Jiang Jiang Jian
be0801377d Merge branch 'bugfix/clear_ifx_tx_queue_v5.3' into 'release/v5.3'
bugfix(wifi): Clear Sta TX queue to prevent key 2 send failure (Backport v5.3)

See merge request espressif/esp-idf!50901
2026-07-29 15:16:35 +08:00
Island
6e1600f2f9 Merge branch 'feat/add_bt_common_npl_v5.3' into 'release/v5.3'
feat(bt): Add host-agnostic BT OSAL and shared BLE profile task (5.3)

See merge request espressif/esp-idf!51217
2026-07-29 15:00:21 +08:00
akshat
a791b31867 bugfix(wifi): Clear Sta TX queue to prevent key 2 send failure
Also, Ensure correct return values for key 2 and key 4.
2026-07-29 10:45:06 +05:30
morris
681fd6177f fix(sdspi): reject oversized pre-read data before block receive
Guard start_command_read_blocks against cards that place TOKEN_BLOCK_START so early that extra_data_size exceeds the bytes expected on the current iteration. Without this check, the unsigned subtraction for will_receive underflows and propagates into memset, SPI transaction length, and memcpy counts against the fixed 516-byte block buffer.
2026-07-29 11:45:31 +08:00
morris
d2984d636d fix(spi_slave): free DMA-private buffers when transaction queue is full
spi_slave_queue_trans calls spi_slave_setup_priv_trans to allocate
DMA buffers, then tries xQueueSend. If the queue is full the function
returns ESP_ERR_TIMEOUT without freeing those buffers, leaking up to
2 * max_transfer_sz per failed call. Call spi_slave_uninstall_priv_trans
before returning the timeout.
2026-07-29 11:45:31 +08:00
morris
421b3f8954 fix(jpeg): release platform mutex on semaphore/pm-lock allocation failure
jpeg_acquire_codec_handle acquires s_jpeg_platform.mutex at entry
but two ESP_RETURN_ON_* macros (semaphore-create and PM-lock-create
failure) return without releasing it. Replace with ESP_GOTO_ON_*
that jumps to a cleanup label which frees partial resources, NULLs
the codec pointer, and releases the mutex.
2026-07-29 11:45:31 +08:00
morris
63fa4546a0 fix(i2c): release platform mutex on intr/pm_lock delete failure
ESP_RETURN_ON_ERROR inside the s_i2c_platform.mutex critical section
returns without releasing the mutex, permanently blocking all I2C
bus operations. Replace with ESP_GOTO_ON_ERROR that jumps to a
cleanup label releasing the mutex before return.
2026-07-29 11:45:31 +08:00
morris
4f054f74bb fix(csi): move csi_fsm init before resource allocation to fix err-path leak
CSI_FSM_INIT is 1, but the controller struct is zero-allocated.
Any failure before the former csi_fsm assignment (near the end of
esp_cam_new_csi_ctlr) jumped to err: which called s_del_csi_ctlr.
That function bailed out immediately because csi_fsm == 0, leaking
the claimed slot, queue, bridge, DMA channel, PM lock, and backup
buffer. Move csi_fsm = CSI_FSM_INIT right after a successful claim
so the err: path properly tears down all allocated resources.
2026-07-29 11:42:56 +08:00
morris
05ebe7ad4b fix(adc): add missing input validation for channel and ret_handle
- adc_cali_curve_fitting: validate config->chan in check_valid() to
  prevent OOB access into s_adc_cali_chan_compens compensation table
- adc_filter: make s_adc_filter_free idempotent on !UNIT_BINDED SoCs
  to prevent double-free on repeated adc_del_continuous_iir_filter
- adc_cali_line_fitting(esp32): fix config && config typo to
  config && ret_handle, preventing NULL-pointer dereference
2026-07-29 11:42:56 +08:00
Jiang Jiang Jian
ffd6fbd9fc Merge branch 'bugfix/fix_some_coex_bugs_260727_v5.3' into 'release/v5.3'
fix(coex): move 15.4 register configuration to 15.4 init(Backport v5.3)

See merge request espressif/esp-idf!51178
2026-07-29 10:23:34 +08:00
Jiang Jiang Jian
06ec4430d0 Merge branch 'bugfix/roaming_app_issues_v5.3' into 'release/v5.3'
Fixed some issues in roaming app found using static analysis(v5.3)

See merge request espressif/esp-idf!49937
2026-07-29 10:17:57 +08:00
Jiang Jiang Jian
74622529fd Merge branch 'fix/fix_iram_sleep_process_access_cache_v5.3' into 'release/v5.3'
fix(esp_hw_support): fix get_act_hp/lp_dbias accessed ext mem (v5.3)

See merge request espressif/esp-idf!51212
2026-07-29 10:15:42 +08:00
Jin Chen
eeecd45929 change(ble): [AUTO_MR] Update lib_esp32c6 to 18aafc6f
(cherry picked from commit 624845829a)

Co-authored-by: cjin <jinchen@espressif.com>
2026-07-29 08:42:09 +08:00