Commit Graph

50777 Commits

Author SHA1 Message Date
Laukik Hase
00cff977c6 fix(esp_tee): Avoid crypto peripherals reset with esp_restart() from REE
- Reset the crypto peripherals during TEE initialization
2026-06-26 15:07:23 +05:30
Laukik Hase
e1bbb70278 fix(esp_tee): Prevent TEE from dispatching the REE heap poisoning callback 2026-06-26 15:07:22 +05:30
Aditya Patwardhan
70531b1a59 Merge branch 'update/version_6_0_2' into 'release/v6.0'
Update version to 6.0.2

See merge request espressif/esp-idf!49823
2026-06-25 07:36:34 +05:30
Aditya Patwardhan
7101770dc6 change(version): Update version to 6.0.2 v6.0.2 2026-06-19 12:18:37 +05:50
Aditya Patwardhan
f82a0593e0 Merge branch 'fix/secure_boot_bootloader_ecdsa_range_gate_v6.0' into 'release/v6.0'
Add ECDSA signature bounds check in bootloader before Secure Boot verify (v6.0)

See merge request espressif/esp-idf!49633
2026-06-19 11:51:09 +05:30
harshal.patil
5ed711bc06 fix(esp_common/esp_fault): make ESP_FAULT_ASSERT survive optimization
ESP_FAULT_ASSERT(C) was silently deleted by the optimizer when C is a cached
flag/status already proven by a preceding `if (!C) return/goto`: the compiler
folds C to a constant and drops all three checks, removing the fault-injection
protection with no warning.
2026-06-18 19:41:56 +05:30
Jiang Jiang Jian
c285367cf0 Merge branch 'change/ble_update_lib_20260612_v6.0' into 'release/v6.0'
change(ble): [AUTO_MR] 20260612 - Update ESP BLE Controller Lib (6.0)

See merge request espressif/esp-idf!49610
2026-06-18 17:20:41 +08:00
Laukik Hase
e32bf61924 Merge branch 'fix/esp_tee_bbp_v6.0' into 'release/v6.0'
fix(esp_tee): Harden TEE secure services against REE manipulation (v6.0)

See merge request espressif/esp-idf!49369
2026-06-18 12:36:20 +05:30
harshal.patil
5f824c8683 fix(secure_boot): range-check ECDSA r,s in bootloader before ROM verify 2026-06-12 17:32:38 +05:30
Zhou Xiao
638cd4c1bd change(ble): [AUTO_MR] Update lib_esp32c2 to 750d4902
(cherry picked from commit 897f3b2af1)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-06-12 12:14:38 +08:00
Aditya Patwardhan
839352f836 Merge branch 'fix/disable_secure_boot_v2_ecdsa_v6.0' into 'release/v6.0'
Fix/disable secure boot v2 ecdsa (v6.0)

See merge request espressif/esp-idf!49470
2026-06-11 07:48:52 +05:30
morris
970c2f83c3 Merge branch 'fix/jpeg_cve_fix_v6.0' into 'release/v6.0'
fix(jpeg_decoder): Add some strict check to avoid bad picture attack (backport v6.0)

See merge request espressif/esp-idf!49254
2026-06-11 10:13:09 +08:00
Aditya Patwardhan
94be07050f change(secure_boot): mark ECDSA based Secure Boot V2 as insecure on affected SoCs
ECDSA based Secure Boot V2 is not functional for certain input vectors on
ESP32-C5/C61/H2/P4 and on the preview targets ESP32-H4/H21. RSA based Secure
Boot V2 is the recommended scheme where the SoC supports it. This issue will be
fixed in a future hardware ECO revision; more details will be shared through the
hardware errata document.

A new hidden Kconfig option SECURE_BOOT_V2_ECDSA_INSECURE marks the affected
mass-production SoCs (ESP32-C5/C61/H2/P4). On these SoCs, when hardware Secure
Boot V2 is enabled, the ECDSA (V2) signing scheme is no longer offered by
default; it must be turned on explicitly via SECURE_BOOT_V2_FORCE_ENABLE_ECDSA
under "Allow potentially insecure options" (CONFIG_SECURE_BOOT_INSECURE). App
signing without hardware Secure Boot is not affected. Note that ESP32-C61 has no
RSA based Secure Boot V2, so it has no Secure Boot scheme enabled by default.

The preview targets ESP32-H4 and ESP32-H21 mark ECDSA Secure Boot V2 as not
supported in their SoC capabilities instead of using the option above. As
ESP32-H4 has no other Secure Boot V2 scheme, Secure Boot is disabled entirely on
it; ESP32-H21 retains RSA based Secure Boot V2.

The security documentation keeps the ECDSA Secure Boot V2 content visible and
adds a warning describing the limitation (including that ECDSA Secure Boot V2 on
ESP32-C61 is not recommended for production). CI apps that exercise ECDSA Secure
Boot V2 on the affected SoCs set CONFIG_SECURE_BOOT_V2_FORCE_ENABLE_ECDSA
accordingly.
2026-06-10 18:06:48 +05:30
Aditya Patwardhan
a66f301ca2 Merge branch 'fix/ecdsa_ecc_hw_input_validation_v6.0' into 'release/v6.0'
Validate ECDSA signature range and harden ECC memory power-down (v6.0)

See merge request espressif/esp-idf!49428
2026-06-10 18:06:25 +05:30
Laukik Hase
6af1af7d99 fix(esp_tee): Harden the TEE secure services against REE manipulation
- `bootloader_flash_execute_command_common`: whitelist the flash command
   opcodes the REE actually uses; reject the rest
- `spi_flash_hal_* services`: a forged `host->driver` could hijack TEE
   control flow since the HAL dispatches through it, so swap
   `host->driver` to a TEE-rodata vtable around each HAL call
- Deny partition table and bootloader writes by default and permit
  bootloader writes only when explicitly enabled via
  `CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED` option
- Protect the TEE-assigned interrupt pin configuration against REE
- Validate nested DS context pointers in start/finish_sign and bound
  the result copy to the SoC max signature size
- Fix the stack usage in service dispatcher argument parsing
2026-06-10 12:06:26 +05:30
harshal.patil
b420f20040 test(esp_hal_security): warm up ECC const-time loop before measuring 2026-06-09 15:07:55 +05:30
harshal.patil
6b8f830991 fix(esp_tee): Reset crypto peripherals before the panic-induced reset 2026-06-09 15:07:55 +05:30
harshal.patil
c1f70a4cb5 fix(esp_rom): Patch ets_ecdsa_verify() to include signature bounds check 2026-06-09 15:07:53 +05:30
harshal.patil
3195c942da fix(mbedtls): validate ECDSA signature range and harden ECC memory power-down 2026-06-09 15:02:59 +05:30
Jiang Jiang Jian
a0688c6e32 Merge branch 'bugfix/add_monitor_en_rst_in_pvt_func_backport_v6.0' into 'release/v6.0'
feat(pvt): fix monitor en rst error in pvt func on v6.0

See merge request espressif/esp-idf!49029
2026-06-05 02:55:23 +08:00
Jiang Jiang Jian
6d84812088 Merge branch 'fix/phy_cal_v6.0' into 'release/v6.0'
fix(phy): fix wifi tx failed when sta wake from deepsleep v6.0

See merge request espressif/esp-idf!49287
2026-06-05 01:18:39 +08:00
Jiang Jiang Jian
7b2945f989 Merge branch 'fix/fix_conn_recycle_assertion_at_halt_v6.0' into 'release/v6.0'
fix(ble): fix conn recycle assertion at halt on ESP32-C2 (6.0)

See merge request espressif/esp-idf!49238
2026-06-04 22:56:41 +08:00
sibeibei
9dc707c44b fix(phy): fix wifi tx failed when sta wake from deepsleep 2026-06-04 21:06:17 +08:00
yanzihan@espressif.com
c348f39ad4 feat(pvt): fix monitor en rst error in pvt func on v6.0 2026-06-04 17:36:20 +08:00
C.S.M
f2df45bced fix(jpeg_decoder): Add some strict check to avoid bad picture attack 2026-06-04 11:40:41 +08:00
Jiang Jiang Jian
7fae4eace6 Merge branch 'bugfix/fix_bt_incorrect_error_code_v6.0' into 'release/v6.0'
fix(bt): Correct the error code in pairing when pin code req rejected by host (v6.0)

See merge request espressif/esp-idf!48791
2026-06-04 10:30:02 +08:00
Jiang Jiang Jian
a4aa3faf9f Merge branch 'bugfix/allow_m1_for_pmk_cache_v6.0' into 'release/v6.0'
fix(esp_wifi): Allow M1 in pmk caching case (v6.0)

See merge request espressif/esp-idf!49030
2026-06-04 10:29:23 +08:00
Jiang Jiang Jian
58f079cc13 Merge branch 'fix/openthread_rcp_uart_senddone_on_fail_v6.0' into 'release/v6.0'
fix(openthread): avoid HDLC TX stall on fd write failure (v6.0)

See merge request espressif/esp-idf!49071
2026-06-03 18:09:15 +08:00
Jiang Jiang Jian
4cb6a7c15a Merge branch 'fix/154_txrx_at_time_v6.0' into 'release/v6.0'
fix(802.15.4): remove comparison between txrx_at and ramp time (v6.0)

See merge request espressif/esp-idf!49079
2026-06-03 18:08:57 +08:00
Jin Chen
039df7c554 fix(ble): fix conn recycle assertion at halt on ESP32-C2
(cherry picked from commit 5483aeedb6)

Co-authored-by: cjin <jinchen@espressif.com>
2026-06-03 17:54:09 +08:00
Jiang Jiang Jian
948a5277ef Merge branch 'fix/fix_mbedtls_fs_io_psa_storage_v6.0' into 'release/v6.0'
fix(mbedtls): keep psa crypto storage enabled with ITS backend (v6.0)

See merge request espressif/esp-idf!48622
2026-06-03 16:44:19 +08:00
Jiang Jiang Jian
45bbf6d506 Merge branch 'bugfix/fix_ble_coded_phy_rx_bug_v6.0' into 'release/v6.0'
fix(coex): fix ble coded phy rx issue when aborted by coex (v6.0)

See merge request espressif/esp-idf!48982
2026-06-03 16:39:10 +08:00
Jiang Jiang Jian
c207f867ac Merge branch 'bugfix/ft_igtk_installation_v6.0' into 'release/v6.0'
fix(esp_wifi): Correct igtk key installation in ft-psk mode (v6.0)

See merge request espressif/esp-idf!49209
2026-06-03 14:08:03 +08:00
Kapil Gupta
e862096a56 fix(esp_wifi): Correct igtk key installation in ft 2026-06-03 08:53:46 +05:30
Jiang Jiang Jian
ee92b559f0 Merge branch 'fix-fix_ub_in_gpio_wakeup_setting_v6.0' into 'release/v6.0'
fix(esp_hw_support): add validation for gpio_pin_mask (v6.0)

See merge request espressif/esp-idf!49106
2026-06-03 10:55:54 +08:00
Jiang Jiang Jian
011fee3374 Merge branch 'fix/tls-session-verify-and-hostname-warn_v6.0' into 'release/v6.0'
fix(esp-tls): fix TLS session resumption bypassing CA verification and clarify skip_common_name behavior (v6.0)

See merge request espressif/esp-idf!48929
2026-06-03 10:46:03 +08:00
Jiang Jiang Jian
59032327db Merge branch 'fix/mbedtls-psa-constant-time-and-zeroization_v6.0' into 'release/v6.0'
fix(mbedtls): use constant-time compare for MAC verify and zeroize key material (v6.0)

See merge request espressif/esp-idf!48729
2026-06-02 20:12:59 +08:00
Jiang Jiang Jian
e4cec9653c Merge branch 'fix/mbedtls-psa-hmac-opaque-abort-null-deref_v6.0' into 'release/v6.0'
fix(mbedtls): correct inverted NULL check in esp_hmac_abort_opaque (v6.0)

See merge request espressif/esp-idf!48731
2026-06-02 20:12:37 +08:00
Jiang Jiang Jian
f923b26769 Merge branch 'fix/fix_put_phy_init_bin_into_partiiton_when_embed_v6.0' into 'release/v6.0'
fix(phy): fix still put multiple phy init date bin into flash when...(backport v6.0)

See merge request espressif/esp-idf!49148
2026-06-02 20:11:59 +08:00
yinqingzhao
7e4fbdb971 fix(phy): fix still put multiple phy init date bin into flash when CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN_EMBED is enabled 2026-06-02 12:06:17 +08:00
Jiang Jiang Jian
99a0d1e604 Merge branch 'fix/fix_rtc_spinlock_sleep_dead_lock_v6.0' into 'release/v6.0'
fix(esp_hw_support): fix possible dead lock in deepsleep process (v6.0)

See merge request espressif/esp-idf!49067
2026-06-02 11:25:23 +08:00
wuzhenghui
7cd6206eeb fix(esp_hw_support): add validation for gpio_pin_mask 2026-06-01 19:34:46 +08:00
Jiang Jiang Jian
30e5a5d026 Merge branch 'fix/roam_backoff_reschedule_v6.0' into 'release/v6.0'
Prevent timeout payload double-free on deinit (v6.0)

See merge request espressif/esp-idf!48629
2026-06-01 17:22:26 +08:00
Jiang Jiang Jian
f2b8de2f7b Merge branch 'ci/forced_esptool_install_v6.0' into 'release/v6.0'
CI: Force the update of esptool to the latest dev release in every job (v6.0)

See merge request espressif/esp-idf!48632
2026-06-01 16:16:09 +08:00
chendejin
6f6815232e fix(802.15.4): remove comparison between txrx_at and ramp time 2026-06-01 13:17:43 +08:00
Xu Si Yu
144323a8ee fix(openthread): avoid HDLC TX stall on fd write failure 2026-06-01 10:33:18 +08:00
Aditya Patwardhan
f77a7d16ec fix(mbedtls): use constant-time compare and zeroize key material
Replace memcmp with mbedtls_ct_memcmp in PSA MAC verify_finish entries
(CMAC, HMAC-transparent, HMAC-opaque) to prevent timing side-channel
MAC forgery, and unconditionally zeroize the locally-computed MAC on
the stack before return so a later stack-disclosure primitive cannot
recover the valid MAC.

Replace bzero with mbedtls_platform_zeroize in AES context free paths.
2026-05-30 23:15:44 +05:30
Aditya Patwardhan
4fb4dbda90 fix(mbedtls): correct inverted NULL check in esp_hmac_abort_opaque
esp_hmac_abort_opaque() had an inverted guard that called
mbedtls_platform_zeroize() on the context only when the context pointer
was NULL, dereferencing NULL and skipping cleanup of valid contexts.

Effect:
* Calling the abort path with a NULL pointer crashes (NULL write)
  instead of being a safe no-op.
* The valid (non-NULL) HMAC opaque operation context is never zeroized
  on abort, leaving sensitive intermediate HMAC state and key handle
  references in operation memory until the buffer is overwritten or
  freed.

Fix: invert the check so zeroization runs only when the context pointer
is non-NULL.
2026-05-30 23:15:42 +05:30
wuzhenghui
12af88b3d9 fix(esp_hw_support): fix possible dead lock in deepsleep process 2026-05-29 21:21:36 +08:00
Jiang Jiang Jian
9d24b38a42 Merge branch 'fix/bring_back_ecjpake_config_v6.0' into 'release/v6.0'
fix(mbedtls): bring back deprecated config MBEDTLS_ECJPAKE_C (v6.0)

See merge request espressif/esp-idf!48623
2026-05-29 17:27:59 +08:00