Commit Graph

35909 Commits

Author SHA1 Message Date
Jiang Jiang Jian
27515af469 Merge branch 'fix/fix_deepsleep_deadlock_if_threadsafe_claim_is_not_enabled_v6.0' into 'release/v6.0'
fix(esp_hw_support): fix deepsleep deadlock if threadsafe claim is not enabled (v6.0)

See merge request espressif/esp-idf!51190
2026-08-20 20:45:23 +08:00
Jiang Jiang Jian
4c194ed015 Merge branch 'fix/set_errno_if_usj_not_connect_in_vfs_v6.0' into 'release/v6.0'
fix(esp_driver_usb): set errno if usj not connect in vfs read/write (v6.0)

See merge request espressif/esp-idf!51199
2026-08-20 20:44:54 +08:00
Jiang Jiang Jian
f13bc3334a Merge branch 'fix/owe_prevent_double_free_v6.0' into 'release/v6.0'
fix(wifi): Prevent double free in owe failure path(v6.0)

See merge request espressif/esp-idf!51639
2026-08-20 20:43:25 +08:00
mutatrum
381d456f7e Fix default value type of FATFS_PRINT_LLI and FATFS_PRINT_FLOAT 2026-08-20 10:03:49 +02:00
Shreyas Sheth
40b0c613e0 fix(esp_wifi): Harden dpp Auth confirm and drop mismatched auth confirms 2026-08-19 14:26:23 +05:30
wuzhenghui
b5bd8395fc fix(esp_hw_support): fix esp32p4 PVT clock lost 2026-08-19 11:50:48 +08:00
Ashish Sharma
a04d78a7e7 fix(esp-tls): correct return codes and harden TLS 1.3 ticket handling 2026-08-19 11:45:42 +08:00
Ashish Sharma
7d53b4740b fix(ws): enforce RFC 6455 §4.2.1 handshake requirements 2026-08-19 11:43:09 +08:00
Ashish Sharma
64287ae681 test(http_server): add mock TCP client for black-box WS testing 2026-08-19 11:43:08 +08:00
Sajia
1d135bebcf fix(wifi): Prevent double free in owe failure path 2026-08-18 11:27:24 +08:00
Xu Si Yu
ad4f977e04 fix(openthread): fix configuration-related issues 2026-08-17 14:15:55 +08:00
Xu Si Yu
1a4f49ac7d feat(openthread): support multipan feature for RCP 2026-08-14 18:48:30 +08:00
Xu Si Yu
0a99f34ac0 feat(openthread): initialize multiple_instances source directory 2026-08-14 18:48:30 +08:00
Xu Si Yu
0311dcf655 fix(ieee802154): clear RX buffer state on MAC init 2026-08-14 18:48:30 +08:00
Xu Si Yu
a4398b1749 feat(802.15.4): reorganize source file structure 2026-08-14 18:48:30 +08:00
Xu Si Yu
76b8a72495 feat(openthread): reorganize source file structure 2026-08-14 18:48:30 +08:00
Shu Chen
88510ad34c feat(openthread): use the actual receive sensitivity for link quality evaluation 2026-08-14 18:48:30 +08:00
yangfeng
02f41c63b7 fix(bt): do not cap AVDTP Discover results by local SEP count
- Closes https://github.com/espressif/esp-idf/issues/18848
2026-08-13 19:31:52 +08:00
yangfeng
991ee96741 fix(bluedroid): Fix the compilation issue of BCM_STRNCPY_S 2026-08-13 19:16:03 +08:00
Armando (Dou Yiwen)
5af18cd40b fix(mpll): fix mpll calibration fail bug 2026-08-12 13:33:08 +08:00
linruihao
359e211b17 docs(coex): enable coexist docs for c61 2026-08-12 08:55:18 +08:00
harshal.patil
516e849636 change(security): disable Key Manager support on ESP32-C5/P4/S31
The Key Manager hardware peripheral in its current form needs further
design changes before it can be offered as a production feature.
Until a revised peripheral design is available, withdraw ESP-IDF
support for it on all Key Manager capable targets.
2026-08-11 09:41:38 +05:30
Frantisek Hrbata
e7b24828b3 fix(cxx): avoid self-referential generator expression in libgcc_cxx
The cxx component re-injects its own archive late on the link line so its
stack-unwind wrappers take precedence over libgcc's (when C++ exceptions
are disabled). It does this through an INTERFACE helper, libgcc_cxx, that
carries `$<TARGET_FILE:${cxx}>`. That helper was linked back into the cxx
target with PUBLIC, which places it in the cxx archive's own
LINK_LIBRARIES, so the cxx target ends up transitively referencing its
own output file.

When CMake computes the cxx target's sources it walks the target's own
link implementation, encounters `$<TARGET_FILE:${cxx}>`, and to resolve the
file it needs the target's link language, which in turn needs its
sources. This loop makes generation fail with:

    The SOURCES of "..." use a generator expression that depends on the
    SOURCES themselves.

CMake only hits this when it reaches the cxx target standalone before the
target has been pulled into a link by a consumer, and whether that
happens depends on the project layout and target evaluation order. That
is why it surfaces only in some projects, while the examples build fine.

Link libgcc_cxx as INTERFACE instead of PUBLIC. A static archive is not
linked, so its private LINK_LIBRARIES are inert; consumers still receive
libgcc_cxx through INTERFACE_LINK_LIBRARIES, so the intended link order is
preserved. Removing the self-reference makes generation independent of
evaluation order.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-08-06 15:31:57 +02:00
Adam Múdry
109cd54902 feat(esp_partition): Add esp_partition_flash_binary() CMake function
Add a new CMake function esp_partition_flash_binary() that provides a
unified API for registering partition data binaries to be flashed. It
replaces the direct esptool_py_flash_target calls scattered across
components (spiffs, fatfs, nvs_flash) with a single function that:

- Resolves partition offset from the partition table automatically
- Determines encryption requirements (auto-detect or ALWAYS_PLAINTEXT)
- Creates per-partition flash targets (e.g. idf.py <partition>-flash)
- Optionally includes the binary in `idf.py flash` via FLASH_IN_PROJECT

On the linux target, the function registers binaries for pre-loading
into the emulated flash. A build-time manifest (linux_flash_data.txt)
is generated via file(GENERATE), and partition_linux.c reads it at
runtime to copy each binary into the memory-mapped flash buffer at
the correct offset.

The partition_ops example is updated to use the new function and
includes a custom_partition with pre-built data to demonstrate the
full workflow, including on the linux target.
2026-08-06 14:35:47 +02:00
Alexey Lapshin
0c28bbe3f8 feat(libc): pass __PICOLIBC_ERRNO_FUNCTION to picolibc builds 2026-08-05 16:45:09 +07:00
Jiang Jiang Jian
c80598ef7f Merge branch 'fix/rtc_retain_mem_sb_fast_wakeup_ptr_v6.0' into 'release/v6.0'
fix(bootloader_support): fix RTC retain mem offset for secure boot fast wakeup (v6.0)

See merge request espressif/esp-idf!51267
2026-08-05 10:44:26 +08:00
hejiaxin
744c1b0474 feat(bluedroid): Add config to place btu and hci task stack in psram
- Also adjust the osi_thread_stop implementation.
2026-08-04 14:55:54 +08:00
Laukik Hase
47cabb21e8 fix(esp_tee): Validate REE-supplied memory bounds (esp_tee_app_config) before use 2026-08-04 12:11:43 +05:30
Laukik Hase
b85a7b0e14 fix(esp_tee): Validate the stack pointer at the privilege switch boundary 2026-08-04 12:11:42 +05:30
morris
ccbf782ed0 fix(bitscrambler): reject malformed program headers
Validate BitScrambler program headers against the supported format and
hardware limits before using header-derived instruction and LUT sizes.
Also add regression coverage for malformed headers and document that the
program blob must come from a trusted assembler output.
2026-08-03 10:35:42 +08:00
morris
dca0fb8bc2 fix(bitscrambler): validate and safely load LUT data
Reject LUT loads that exceed the hardware address space and assemble
each 32-bit LUT word via memcpy so unaligned and partial inputs do not
read past the caller buffer. Add regression tests for oversized and
partial unaligned LUT loads.
2026-08-03 10:18:38 +08:00
morris
db76b4cb1b fix(bitscrambler): clean up loopback create failures
Clear the returned handle on loopback creation failure and route
initialized objects through bitscrambler_free so channel ownership and
extra cleanup state cannot leak after partial setup errors. Add a
regression test for the failed create path.
2026-08-03 10:18:38 +08:00
sonika.rathi
0d9a7b87b3 fix(storage): mark storage pytest apps flaky in CI 2026-07-31 08:53:16 +02:00
harshal.patil
6dd847c8dd 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 10:54:32 +08:00
zwx
c6df387214 fix(openthread): fix null pointer deref, uninitialized struct, and unbounded strcpy in spinel/RCP code 2026-07-30 18:58:50 +08:00
zwx
ea87c83a6f fix(ieee802154): skip receive_at when rx window already expired 2026-07-30 18:51:51 +08:00
Alexey Lapshin
fbaf869fb9 feat(build): add RISC-V ZCMP post-link workaround check
Validate linked RISC-V executables when
CONFIG_COMPILER_ENABLE_RISCV_ZCMP is enabled on affected chips.
Disassemble each function and reject mstatus.MIE clears that lack an
earlier mintthresh write of 0xff.

Handle csrrci, csrrw, and register-mask csrrc patterns while ignoring
csrrs. Add build-only coverage for valid and invalid sequences with
CMake v1 and v2.

Stop the hardware stack guard before switching stacks during restart,
and keep ZCMP disabled for TEE test apps that still require the
workaround.
2026-07-30 12:14:54 +07:00
zhangyanjiao
33fced6ad6 fix(wifi): fixed espnow data rate overridden by stale rate control 2026-07-30 12:11:03 +08:00
cjin
3a0cbb0736 fix(bt): fix deselect slow clk missing on ESP32-C5 2026-07-30 10:39:21 +08:00
hejiaxin
7f42eabb08 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-29 17:05:31 +08:00
wuzhenghui
f327a4d641 fix(bootloader_support): fix RTC retain mem offset for secure boot fast wakeup
Pointer arithmetic on rtc_retain_mem_t* subtracted ESP_SECURE_BOOT_DIGEST_LEN
in struct units instead of bytes. Cast through uintptr_t so retain mem stays
below the ROM verified-image digest region on deep-sleep wake.

Partial backport of !51265 (bootloader_common_loader.c only).
2026-07-28 21:50:18 +08:00
Abhik Roy
e1951e6f35 docs(lwip): clarify DNS_MAX_HOST_IP range and addr_cnt in Kconfig 2026-07-28 22:05:58 +10:00
Laukik Hase
4c8ee351b7 ci(esp_tee): Fix tee_cli_app build failure due to heap size overflow 2026-07-28 14:53:35 +08:00
Sudeep Mohanty
61a3bce867 refactor(ulp): simplify LP core peripheral IO setup on matrix targets
On SOC_LP_GPIO_MATRIX_SUPPORTED targets, route LP SPI, I2C, and remapped
LP UART pins through lp_gpio_connect_* (rtcio_hal_matrix_* on release
branches applies IOMUX and matrix routing).

Remove redundant rtc_gpio_set_direction and rtc_gpio_iomux_func_sel
before matrix connect for LP SPI and remapped LP UART pins.

Non-matrix LP I2C: use rtc_gpio_iomux_output instead of
rtc_gpio_iomux_func_sel. Non-matrix LP UART: use rtc_gpio_iomux_output
and rtc_gpio_iomux_input for func sel and direction.
2026-07-27 14:01:55 +02:00
Hu Rui
15483941a6 fix(uhci): rx fsm race condition and buffer size check
Closes https://github.com/espressif/esp-idf/issues/18819
Closes https://github.com/espressif/esp-idf/issues/18820
2026-07-27 19:22:47 +08:00
Chen Chen
6a059b6efc feat(mcpwm): fix mcpwm clock init failure
Closes https://github.com/espressif/esp-idf/issues/18666
Closes https://github.com/espressif/esp-idf/issues/18777
2026-07-27 18:12:31 +08:00
wuzhenghui
6016bbfa50 fix(esp_driver_usb): set errno if usj not connect in vfs read/write 2026-07-27 15:31:45 +08:00
wuzhenghui
8bcb658ec0 fix(esp_hw_support): fix deepsleep deadlock at s_phy_int_mux 2026-07-27 15:14:40 +08:00
Jiang Jiang Jian
52ffcbf270 Merge branch 'bugfix/nan_vulnerabilities_v6.0' into 'release/v6.0'
fix(nan): Fix bug bounty reported and discovered vulnerabilities in NAN Rx (Backport v6.0)

See merge request espressif/esp-idf!50741
2026-07-24 23:59:19 +08:00
Jiang Jiang Jian
a1f5d9387e Merge branch 'bugfix/ppa_buffer_oob_v6.0' into 'release/v6.0'
fix(ppa): add checks for input to avoid any OOB access (v6.0)

See merge request espressif/esp-idf!51139
2026-07-24 20:45:15 +08:00