Commit Graph
36161 Commits
Author SHA1 Message Date
Steven (Yang Minghui) 624a9c6551 feat(spi): support data output inversion 2026-09-10 22:08:59 +08:00
liuning 3cc7f04f70 fix(wifi): fix chip cant sleep when disconnecting at probe process 2026-09-10 20:55:42 +08:00
Island 0c269a2f66 Merge branch 'fix/esp32-ble-dtm-txbuf-leak_v6.0' into 'release/v6.0'
Fix DTM TX buffer leak in the BLE controller that could cause memory exhaustion and Interrupt WDT timeout during or after DTM TX tests. (6.0)

See merge request espressif/esp-idf!52615
2026-09-10 20:50:53 +08:00
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
zwx 890b939847 fix(openthread): preserve host interface on UDP receive 2026-09-10 16:22:31 +08:00
Martin Vychodil c734860ba1 Merge branch 'feature/fatfs_bdl_v6.0' into 'release/v6.0'
feat(fatfs): Add BDL support to FatFS component (v6.0)

See merge request espressif/esp-idf!52557
2026-09-10 16:10:00 +08:00
Martin Vychodil e0c1910bb0 Merge branch 'fix/fatfs-vfs-fcntl-setfl_v6.0_2' into 'release/v6.0'
fix(fatfs): preserve access mode in VFS F_SETFL (v6.0)

See merge request espressif/esp-idf!51922
2026-09-10 16:07:28 +08:00
morris 3fd62e1c09 Merge branch 'feat/support_link_switch_for_parlio_tx_v6.0' into 'release/v6.0'
feat(parlio_tx): apply the gdma link switch event to parlio_tx (v6.0)

See merge request espressif/esp-idf!51423
2026-09-10 14:42:20 +08:00
sonika.rathi 00e6b37985 fix(fatfs): avoid stack overflow in BDL diskio partition test
(cherry picked from commit 1d08a22a14)
2026-09-10 08:36:18 +02:00
LiPeng 841c3a4de7 fix(fatfs): fix a memory leak bug when FF_USE_DYN_BUFFER was enabled
BDL diskio test part only; the rest of the commit is already on release/v6.0
via 4f7b1af0f9, which predates components/fatfs/test_apps/bdl.

(cherry picked from commit a8b5b8d582)
2026-09-10 08:36:12 +02:00
Richard Allen 0e59d78459 TLS: Avoid discarded-qualifiers
Just a build issue fix depending on GCC5+ configuration, fixes:

assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
return discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]

Signed-off-by: Richard Allen <richard@bryghtlabs.com>
2026-09-10 11:32:36 +05:30
Jimi Chen c90545c85d SAE: Fix crash due to NULL pointer dereference in H2E parsing
In H2E (Hash-to-Element) mode, sae_parse_commit() parses the optional
Anti-Clogging Token Container by calling sae_parse_token_container().

However, callers of sae_parse_commit() that do not require retrieving
the anti-clogging token (such as PASN initiator/responder and SME auth)
pass NULL for the token and token_len output arguments.

If the peer sends a Commit frame containing a valid Anti-Clogging
Token Container element, sae_parse_token_container() unconditionally
sets *token and *token_len, resulting in a NULL pointer dereference
(SIGSEGV) and crashing wpa_supplicant.

Fix this by adding NULL checks before writing to token and token_len.
Update the debug log to print the token directly using 'pos'.

Fixes: 5e32fb0170f4 ("SAE: Use Anti-Clogging Token Container element with H2E")
Signed-off-by: Amarnath Hullur Subramanyam <amarnathhs@google.com>
2026-09-10 11:32:32 +05:30
Jouni Malinen 5a671d7412 Require network_ctx and AKMP match for accepting PMKSA entry
When wpa_supplicant was processing EAPOL-Key msg 1/4 with a PMKID
indicated by the AP/Authenticator, a PMKSA for the same AA was accepted
without enforcing matching network_ctx (i.e., same network configuration
block) and AKMP. This could allow misbehaving APs to make wpa_supplicant
use an unacceptable PMKSA entry that was generated for a different
network for AKMP under certain conditions. This could result in showing
a connection to an incorrect network when an attacker has credentials to
one network in wpa_supplicant configuration, but not to another network.

Fix this by accepting the PMKID to set the PMKSA for an association only
if the PMKSA with the same PMKID is for the same network and was
generated using the same AKMP.

Signed-off-by: Jouni Malinen <jouni.malinen@oss.qualcomm.com>
2026-09-10 11:32:19 +05:30
Aditi bd545de697 feat(wpa_supplicant): Match SPA when searching PMKSA cache
Store the supplicant address (SPA) in PMKSA cache entries and match
it when looking up the PMKSA cache.

(partially picked from commit 18cbdbf2b1)
2026-09-10 11:27:53 +05:30
Jiang Jiang Jian b5016c7765 Merge branch 'bugfix/fix_crash_issue_on_smartconfig_and_mbssid_v6.0' into 'release/v6.0'
fix(wifi): added validation for password and reserved data length in ESPTouch v2 (v6.0)

See merge request espressif/esp-idf!51393
2026-09-10 11:27:28 +08:00
Jiang Jiang Jian 8dec8dc0b8 Merge branch 'fix/fix_issues_when_support_multiple_phy_init_data_v6.0' into 'release/v6.0'
Fix/fix issues when support multiple phy init data v6.0(backport v6.0)

See merge request espressif/esp-idf!52585
2026-09-10 11:11:34 +08:00
Luo Xu 59a30e9ba2 fix(bt): fix BLE log compression build on Windows
The BLE log compression feature (CONFIG_BT_LOG_CRITICAL_ONLY ->
BLE_COMPRESSED_LOG_ENABLE) failed to build on Windows while working
correctly on Linux, due to two shell/platform-specific issues in the
compression script.

1. Module/source argument quoting. CMakeLists.txt passes the
   semicolon-separated module and source lists wrapped in single quotes
   ("'${MODULES}'") to protect ';' from POSIX shells, which strip them.
   cmd.exe does not treat single quotes as quoting characters, so on
   Windows the quotes reached the script literally and
   args.module.split(';') produced "'BLE_MESH" / "BLE_HOST'" instead of
   the clean names. These never matched the YAML module keys, every
   module was skipped ("Skipping module ... - config not found"), the
   compressed sources were never generated, and the build failed. Strip
   surrounding quote characters before splitting; this is a no-op on
   Linux/macOS where the shell already removed them.

2. CRLF line endings. With core.autocrlf=true the IDF sources are
   checked out as CRLF on Windows. The generated *_log_index.h macros
   use backslash-newline line-continuation; a backslash followed by
   '\r\n' is not a valid continuation in C, producing floods of syntax
   errors when the header is compiled. Write generated headers with
   newline='' to force LF, and normalize source content to LF right
   after reading so '\r' embedded inside multi-line argument expressions
   is also handled. Byte offsets stay consistent because both tree-sitter
   parsing and tag replacement operate on the normalized content.

Verified by full clean builds of examples/bluetooth/esp_ble_mesh/
vendor_models/vendor_client (esp32c6, bluedroid + mesh) from both
cmd.exe and PowerShell; both produce an identical vendor_client.bin.


(cherry picked from commit aa9b565a6d)

Co-authored-by: luoxu <luoxu@espressif.com>
2026-09-10 10:29:15 +08:00
Luo Xu 12aa692dcc 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-09-10 10:29:07 +08:00
Marius Vikhammer 5c35b8848e fix(ulp): hardcode LP core RC_FAST frequency per target
The SoC RC_FAST approximation is a nominal figure that can be off by ~10%
from the clock the LP core actually runs at, which made
ulp_lp_core_delay_us() over-delay by up to 9% and the LP core delay test
flake on ESP32-C5 and ESP32-C6.

Use a measured per-target value instead, and fail the build for targets
that have no measured value so that new chips cannot silently inherit a
wrong one.
2026-09-10 09:24:09 +08:00
zhangyanjiao 55aed8276c fix(wifi): fixed the buffer overflow issues
1. Added validation for password and reserved data length in ESPTouch v2
2. Added bound check for data index in ESPTouch v1 HT40
3. prevent buffer overflow when parsing MBSSID beacon
2026-09-09 19:37:40 +08:00
Erhan Kurubas 08bc66dc08 change(esp_trace): skip unused timer reads on the per-event path
Lock take called esp_timer_get_time() before trying the spinlock, and the
C3 default timestamp went through esp_timer's tick-to-us conversion.
Try the lock first, and read systimer ticks directly.

(cherry picked from commit 4709507f3e)
2026-09-09 12:24:53 +02:00
Erhan Kurubas 1971a58caa change(esp_trace): compile hot path at -O2 regardless of project optimization
Every event record runs through this component, so -Og on the rest of the
project should not set the per-event tracing overhead.

(cherry picked from commit 44a38047bb)
2026-09-09 12:23:11 +02:00
Astha Verma 5048d40e1b fix(nimble): Fix nimble HID service discovery 2026-09-09 14:09:04 +05:30
yi chen e008c0873f fix(esp_http_client): prevent silent truncation after read timeouts
A blocking transport read can return zero when no data arrives before
timeout. Passing that zero length to http_parser_execute signals EOF while
a response is incomplete, puts the parser in HPE_INVALID_EOF_STATE, and
causes later response bytes to be discarded. The shortened response can
then be treated as successful.

Skip parser execution for every zero-length transport read, not only async
reads. Also compare the raw esp_transport_read result against raw
ERR_TCP_TRANSPORT values so timeout and peer-close failures retain their
documented HTTP error classifications.

A standalone reproduction built with the unmodified HTTP parser showed the
blocking timeout transition to HPE_INVALID_EOF_STATE and loss of the
remaining 15 bytes. Skipping the zero-length parser call delivered the full
chunk and message-complete callback.

Disclosure: this fix was prepared with AI assistance (Claude) and reviewed by me before submission.

Constraint: esp_http_client_get_data returns raw transport result values before esp_transport_translate_error.
Rejected: Keep the async-only zero-length guard | blocking transport reads also return zero on timeout.
Confidence: high
Scope-risk: moderate
Directive: Do not pass a transient zero-length transport read to the HTTP parser as EOF.
Tested: standalone blocking mid-chunk timeout reproduction; source-only duplicate-comment cleanup; git diff --check
Not-tested: hardware TLS transport integration
Signed-off-by: yi chen <94xhn1@gmail.com>
2026-09-09 14:51:29 +08:00
yinqingzhao ef72ceb11a fix(phy): update esp32c5 multiple phy init data bin 2026-09-09 14:40:35 +08:00
yinqingzhao 33f19669e4 fix(phy): fix phy init data type and multiple bin offset incorrect 2026-09-09 14:40:35 +08:00
yinqingzhao a2179141e0 feat(test_app): add test app for multiple phy init data 2026-09-09 14:40:19 +08:00
Zhang Hai Peng 77570dfbde fix(bt): remove noisy OSI event handler enter/exit debug logs
These per-event traces fire on every async dispatch and flood BT logs
without aiding diagnosis; higher-layer traces remain for debugging.


(cherry picked from commit b9b9b8633f)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-09-09 14:26:49 +08:00
Zhang Hai Peng b011c3fc72 fix(bt): update ESP32 libbtdm_app.a to 919c7f4b
- fixed dtm tx buffer leak issue


(cherry picked from commit ab7bb35192)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-09-09 14:26:49 +08:00
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
harshal.patil 48a864dd75 fix(esp_security): cover the crypto reset coupling in the driver locks
A peripheral's reset also resets the ones it occupies, so a lock has to cover
both. Gate the ECDSA MPI lock on SOC_ECDSA_USES_MPI rather than the runtime
ecdsa_ll_is_mpi_required() and set that capability on C5, lock the Key Manager
path in esp_key_mgr.c, clean HMAC after its reset, and enable DS before the
primitives its reset covers.
2026-09-08 19:42:35 +05:30
radek.tandler 0762e80999 fix(mbedtls): Fix mbedtls testapps false memory leaks by lazy mutex creation 2026-09-08 19:42:35 +05:30
radek.tandler ba13c2852a fix(esp_security): Stop ECDSA and Key Manager resets from corrupting concurrent crypto
ECDSA enable pulses a reset that also holds SHA in reset, and SHA shares
its DMA with AES. Key Manager enable pulses a reset that also covers the
XTS-AES flash encryption key-usage selector. Neither path was serialized
against those victims, so a hardware ECDSA/HMAC/DS operation could
corrupt a concurrent SHA/AES transfer or an in-flight encrypted flash
read.

- Take the SHA/AES lock inside esp_crypto_ecdsa_lock_acquire(), before
  MPI, matching the DS lock order (sha_aes < mpi)
- Add esp_crypto_key_mgr_enable_periph_clk_no_reset() and switch ECDSA,
  HMAC and DS to it; they only need the key-usage selector writable
- Hold esp_crypto_key_manager_lock across those clock enable/disable
  pairs so selector writes stay serialized without resetting KM
2026-09-08 19:42:35 +05:30
Martin Vychodil 059abc43d7 Merge branch 'fix/sdmmc_wait_for_idle_busy_poll_starving_cpu_cores_v6.0' into 'release/v6.0'
fix(sdmmc): back off between CMD13 polls while waiting for card to be ready (v6.0)

See merge request espressif/esp-idf!52533
2026-09-08 19:15:12 +08:00
Alexey Gerenkov 445d48b773 Merge branch 'tracing_test_fixes_v6.0' into 'release/v6.0'
Tracing test fixes (v6.0)

See merge request espressif/esp-idf!52328
2026-09-08 18:43:46 +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
Martin VychodilandCursor 0a3ee6d019 feat(fatfs): Added BDL support to FatFS component
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 09:39:11 +02:00
morris 927f62448a Merge branch 'ci/fix_the_parlio_rx_spi_test_case_v6.0' into 'release/v6.0'
ci(parlio_rx): fixed the parlio rx spi test case (v6.0)

See merge request espressif/esp-idf!51117
2026-09-08 15:12:17 +08:00
morris 5383352582 Merge branch 'bugfix/uart_extra_current_consumption_in_sleep_v6.0' into 'release/v6.0'
fix(uart): reduce current consumption in sleep mode (v6.0)

See merge request espressif/esp-idf!52347
2026-09-08 15:07:26 +08:00
morris 7f7f6cccbf Merge branch 'feat/isp_dpc_support_v6.0' into 'release/v6.0'
feat(isp): support isp dpc dead pixel correction (v6.0)

See merge request espressif/esp-idf!51470
2026-09-08 15:06:44 +08:00
morris 7dc4ca8c87 Merge branch 'change/remove_lcd_restart_for_p4_s31_v6.0' into 'release/v6.0'
remove(lcd): remove restart support for p4 and s31 (v6.0)

See merge request espressif/esp-idf!51352
2026-09-08 14:55:40 +08:00
morris c5a48f7808 Merge branch 'fix/fix_rmt_loop_tx_trigger_done_event_v6.0' into 'release/v6.0'
fix(rmt): clear stale TX done status before new transaction (v6.0)

See merge request espressif/esp-idf!51653
2026-09-08 14:54:48 +08:00
morris 9ee2fcd543 Merge branch 'feat/add_timeout_return_for_dsi_panel_v6.0' into 'release/v6.0'
feat(dsi): add timeout check for lp cmd rx (v6.0)

See merge request espressif/esp-idf!52313
2026-09-08 14:44:11 +08:00
morris 5aa18f1104 Merge branch 'fix/spi_flash_keep_program_erase_in_iram_v6.0' into 'release/v6.0'
fix(spi_flash): keep program and erase paths in IRAM (v6.0)

See merge request espressif/esp-idf!51892
2026-09-08 14:43:07 +08:00
morris 50642bc839 Merge branch 'feat/move_flash_120_out_from_experimental_v6.0' into 'release/v6.0'
feat(flash): p4 flash 120MHz is no longer experimental feature (v6.0)

See merge request espressif/esp-idf!51699
2026-09-08 14:41:26 +08:00
Rahul Tank 1e8fd755ad fix(nimble): Add hardware error event handling as normal event 2026-09-08 12:10:53 +05:30