Commit Graph

53690 Commits

Author SHA1 Message Date
luoxu
2c4acaa2aa 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.
2026-07-03 12:14:21 +08:00
luoxu
43137475e1 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.
2026-07-03 12:14:21 +08:00
luoxu
781218cb62 fix(ble_mesh): added max dfd srv count limit 2026-07-03 12:14:21 +08:00
luoxu
35cd10fbdf fix(ble_mesh): reject invalid chunk size 2026-07-03 12:14:21 +08:00
luoxu
52cfff707f fix(ble_mesh): fixed invalid disconnect handler wrote 2026-07-03 12:14:21 +08:00
luoxu
1b22467f63 fix(ble_mesh): fixed BLE-Mesh NimBLE extended-adv reassembly buffer overflow on COMPLETE fragment 2026-07-03 12:14:21 +08:00
luoxu
00adfb3cbc fix(ble_mesh): fixed BLE-Mesh GATTS read-callback error 2026-07-03 12:14:21 +08:00
Mahavir Jain
625ee1abb7 Merge branch 'fix/harden_esp_security' into 'master'
fix(esp_security): harden crypto peripheral error handling

Closes SEC-236, SEC-351, SEC-352, SEC-353, SEC-355, SEC-356, and SEC-357

See merge request espressif/esp-idf!49828
2026-07-03 09:11:33 +05:30
Wan Lei
86449a8909 Merge branch 'feat/twai_time_trigger_trans' into 'master'
feat(driver_twai): fd hardware support time trigger trans

Closes IDF-12040

See merge request espressif/esp-idf!49524
2026-07-03 11:33:58 +08:00
Mahavir Jain
55c6099838 Merge branch 'refactor/normalize_tee_pycli_script_output' into 'master'
refactor(esp_tee): Normalize the `esp_tee` python tools CLI output

Closes IDF-15329

See merge request espressif/esp-idf!49274
2026-07-03 08:55:22 +05:30
Island
1528f58c00 Merge branch 'fix/ble-log-64-bit-io-setup-support' into 'master'
fix(ble_log): use BIT64 over BIT to support 64-bit IO setup

See merge request espressif/esp-idf!50283
2026-07-03 00:54:00 +08:00
Mahavir Jain
4799efa609 Merge branch 'fix/httpd-content-length-truncation' into 'master'
fix(esp_http_server): reject Content-Length above UINT32_MAX

Closes SEC-102 and SEC-229

See merge request espressif/esp-idf!47554
2026-07-02 21:07:27 +05:30
Laukik Hase
93e2c1e637 refactor(esp_tee): Normalize the esp_tee python tools CLI output 2026-07-02 18:25:54 +05:30
Laukik Hase
e9da155a72 Merge branch 'ci/fix_esp_tee_cli_app_build' into 'master'
ci(esp_tee): Fix `tee_cli_app` build failure due to heap size overflow

See merge request espressif/esp-idf!50297
2026-07-02 16:17:32 +05:30
Jiang Jiang Jian
fa86d80f71 Merge branch 'feat/nan_gtk_support' into 'master'
feat(wifi_aware): advertise group data/mgmt protection (GTK/IGTK/BIGTK) and iOS compliance fixes

See merge request espressif/esp-idf!49800
2026-07-02 18:32:56 +08:00
Adam Múdry
ab352fdbaf Merge branch 'fix/sdmmc_double_buffering_psram_dma_capable' into 'master'
fix(sdmmc): Add a better handling of devices accessing PSRAM through DMA

Closes IDFGH-17455

See merge request espressif/esp-idf!47685
2026-07-02 12:16:19 +02:00
Tomas Rezucha
5f84dab44c Merge branch 'change/utmi_phy_eco_src' into 'master'
change(soc/usb): Merge duplicated definitions for P4 v1 and v3

Closes IDF-13430

See merge request espressif/esp-idf!50272
2026-07-02 11:50:06 +02:00
Laukik Hase
e7261f57f5 ci(esp_tee): Fix tee_cli_app build failure due to heap size overflow
- Also fix the `unused variable` warning while builing the PSA
  AES tests with `tee_test_fw` app
2026-07-02 15:14:42 +05:30
Adam Múdry
0de4ceee63 feat(sdmmc): Use zero-copy TX for SDSPI 2026-07-02 11:39:20 +02:00
Adam Múdry
ba4503a9b5 fix(sdmmc): Add a better handling of devices accessing PSRAM through DMA
Closes https://github.com/espressif/esp-idf/issues/18412
2026-07-02 11:39:20 +02:00
Sonika Rathi
ae8d4a63cb Merge branch 'fix/ci-ignore-warning-partition-size-casing' into 'master'
fix(ci): match all-caps WARNING prefix for partition size warning

See merge request espressif/esp-idf!50265
2026-07-02 17:18:07 +08:00
C.S.M
08b5996134 Merge branch 'fix/flash_32bit_addr' into 'master'
fix(spi_flash): fix flash 32bit address operation on esp32s31

See merge request espressif/esp-idf!50248
2026-07-02 16:50:22 +08:00
Igor Udot
81a613f5b8 Merge branch 'bugfix/parttool-extra-partition-subtypes-eat-all' into 'master'
fix(partition_table): restore multi-value --extra-partition-subtypes parsing

See merge request espressif/esp-idf!50287
2026-07-02 16:20:57 +08:00
Mahavir Jain
bd250902b8 Merge branch 'fix/fix_esp_tee_failing_deterministic_ecdsa_sign' into 'master'
fix(esp_tee): release SHA held by HMAC after crypto peripheral reset

See merge request espressif/esp-idf!50286
2026-07-02 13:46:59 +05:30
Guillaume Souchere
06c7851457 Merge branch 'fix/freertos-linux-simulator' into 'master'
fix(freertos): discard stale wake events on linux port context switch

Closes IDF-15882

See merge request espressif/esp-idf!50285
2026-07-02 10:11:04 +02:00
Mahavir Jain
98f7c78787 Merge branch 'fix/gcc16_unused_but_set_variable' into 'master'
Fix unused-but-set-variable warnings with GCC 16

See merge request espressif/esp-idf!50282
2026-07-02 13:40:46 +05:30
Fu Hanxi
d62782054a Merge branch 'ci/fix_test_apps_shuffle' into 'master'
ci: fix test apps shuffle command

See merge request espressif/esp-idf!50271
2026-07-02 09:37:24 +02:00
Guillaume Souchere
b8f697b80d Merge branch 'feat/console-add-linux-support-for-examples' into 'master'
feat(console): Add linux support for console examples

Closes IDF-15778

See merge request espressif/esp-idf!50268
2026-07-02 09:30:48 +02:00
sonika.rathi
0c6367d15f fix(partition_table): restore multi-value --extra-partition-subtypes parsing 2026-07-02 09:11:29 +02:00
Wang Meng Yang
b4211b144d Merge branch 'bugfix/hfp_example_ci' into 'master'
fix: Fix the HFP example fails to discovery target device

Closes IDFCI-12151 and IDFCI-4605

See merge request espressif/esp-idf!50148
2026-07-02 15:02:28 +08:00
Ashish Sharma
2cbd0afed8 fix(esp_tee): fixes double panic when ESP-TEE panics 2026-07-02 14:52:53 +08:00
Ashish Sharma
2458c81d7d fix(esp_tee): release SHA held by HMAC after crypto peripheral reset 2026-07-02 14:52:53 +08:00
Shen Wei Long
49d191730e Merge branch 'feature/added_qa_related_vs_cmd' into 'master'
feat(ble): Updated libble to 6bbfb64 on ESP32-S31 and ESP32-H4

See merge request espressif/esp-idf!50267
2026-07-02 06:42:40 +00:00
Guillaume Souchere
513c013403 fix(freertos): discard stale wake events on linux port context switch
On the Linux port, tasks are pthreads that cannot be forcibly paused;
the scheduler "unschedules" a task only by selecting a different next
task, and the outgoing task keeps running until it next blocks itself
in event_wait (e.g. via vPortYield). If the scheduler later switches
back into such a task (event_signal) before it ever parked in
event_wait, that wake is never consumed and event_triggered stays
latched. The task's next voluntary block then returns immediately
instead of blocking (e.g. vTaskDelay(100ms) returning in 0ms), which
desynchronizes kernel and port scheduling state.

Clear the outgoing task's pending event when switching to a different
task, under s_port_mutex and atomically with the scheduling decision.
Any latched-but-unconsumed wake is stale at that point; a legitimate
wake can only be delivered later, once the scheduler selects the task
again as next_thread.

Add event_clear() to the wait_for_event helper to support this.

Verified: minimal repros (busy-wait with another ready task, and
pthread-blocked task) now measure 92-101 ms for vTaskDelay(100ms)
instead of 0 ms; linux_freertos kernel test app 18/18 pass; the
previously failing esp_linenoise host test suite passes 34/34.
2026-07-02 08:30:14 +02:00
David Čermák
59d66afdd2 Merge branch 'fix/lwip_sec_high' into 'master'
fix(lwip): high severity lwip fixes

See merge request espressif/esp-idf!49930
2026-07-02 14:15:34 +08:00
morris
6d42fedb5c Merge branch 'docs/i2s_ws_setting' into 'master'
docs(i2s): clarify WS width setting for standard mode

Closes IDFGH-17842

See merge request espressif/esp-idf!49932
2026-07-02 14:12:05 +08:00
Aditya Patwardhan
b5023d4343 Merge branch 'feature/unified_priv_key_interface_across_idf' into 'master'
feat(esp-tls): Added a PSA driver for Secure Element

See merge request espressif/esp-idf!44987
2026-07-02 11:00:42 +05:30
Aditya Patwardhan
9d3f510c7f fix(esp_http_server): reject Content-Length above UINT32_MAX
In httpd_parse.c, cb_headers_complete() converted the HTTP parser's
content_length (uint64_t) to the request's content_len (size_t) via an
unsafe cast through (int). On a 32-bit size_t target a Content-Length
above 4 GiB silently truncated, enabling request smuggling where the
server and an upstream proxy disagree on the body length (CWE-681).

Reject any Content-Length above UINT32_MAX with 413 Content Too Large
before any handler runs. UINT32_MAX is the largest body length the
server can represent in size_t content_len on every target, so this is
the maximum the server can support; no configuration knob is needed.

Closes SEC-102
Closes SEC-229
2026-07-02 10:46:36 +05:30
morris
0816b7f600 Merge branch 'fix/dac_unused_value' into 'master'
fix(dac): remove redundant assert in continuous enable

See merge request espressif/esp-idf!50279
2026-07-02 12:50:01 +08:00
Guillaume Souchere
c18c10f51d feat(console): Add linux support for console examples 2026-07-02 06:46:06 +02:00
Meet Patel
8da676cd87 Merge branch 'feat/ulp_adc_two_channel_example' into 'master'
feat(ulp): demonstrate multi-channel ADC in ULP-RISC-V example

See merge request espressif/esp-idf!50246
2026-07-02 10:00:21 +05:30
Zhou Xiao
a2876d304e fix(ble_log): use BIT64 over BIT to support 64-bit IO setup 2026-07-02 11:26:11 +08:00
yangfeng
fe76a65d22 fix: Fix the HFP example fails to discovery target device 2026-07-02 10:50:38 +08:00
morris
829576fdab fix(dac): remove redundant assert in continuous enable
Drop the internal assert in dac_continuous_enable() and call
 dac_priv_enable_channel() directly, since the surrounding state
 machine already guarantees the preconditions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 10:36:34 +08:00
Mahavir Jain
e16593ebc0 fix(esp_psram): fix unused-but-set-variable warning with GCC 16
GCC 16 flags the volatile accumulator in the cache writeback loops even
though it is volatile, as it is only used to update itself. Drop the
accumulator and rely on the volatile-qualified psram pointer to keep
the cache-line reads from being optimized out.
2026-07-02 07:55:14 +05:30
Mahavir Jain
bd567cf046 fix(wpa_supplicant): fix unused-but-set-variable warnings with GCC 16
GCC 16 raised the default level of -Wunused-but-set-variable and now
flags variables that are only used to update themselves. Remove the
'removed' counter in pmksa_cache_flush() (its only read was commented
out) and mark the EAP-FAST PAC entry counters as unused, since their
only read is inside wpa_printf(MSG_DEBUG, ...) which compiles to a
no-op when debug logging is disabled.
2026-07-02 07:55:13 +05:30
David Cermak
4c3d56aeb6 fix(lwip): tcp/ooseq: do not accept empty fin seg (+ other fixes)
* Update submodule: git log --oneline 9d2d8041..c6f2f878
  - test(lwip): add DHCP MTU validation unit test (espressif/esp-lwip@c6f2f878)
  - ppp: fix potential oob read in VJ decompression (espressif/esp-lwip@2ff439e6)
  - ip6-frag: Fix incorrect memcpy size to the actual struct (espressif/esp-lwip@91ad363b)
  - tcp/ooseq: do not accept empty fin seg (espressif/esp-lwip@fe4fb18c)
2026-07-01 20:21:59 +02:00
Tomas Rezucha
702dc82ed4 change(soc/usb): Merge duplicated definitions for P4 v1 and v3 2026-07-01 19:49:07 +02:00
Sarvesh Bodakhe
61b705f030 refactor(wifi): astyle-format wifi_netif.c
The ternary continuation in esp_wifi_netif_set_static_neighbor() was not
astyle-formatted; re-indent it so the pre-commit astyle hook passes in CI.
2026-07-01 20:30:47 +05:30
Sarvesh Bodakhe
4639b57485 refactor(nan): drop '##' debug marker from key hexdump tags
The six key-material hexdumps (ND-IGTK/BIGTK/TK/GTK and the peer IGTK/BIGTK)
kept a leftover '##' dev-grep marker on their tag string. Drop it; the
descriptive labels stay and the dumps remain at ESP_LOG_DEBUG.
2026-07-01 20:26:10 +05:30