mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-18 19:43:17 +03:00
A corrupted segment data_len was only caught by the image length check after all segments had been checksummed/hashed. On chips with 32-bit cache mapping (e.g. ESP32-P4 with CONFIG_BOOTLOADER_CACHE_32BIT_ADDR_QUAD_FLASH) nothing bounds that walk, so a ~1.8 GB data_len trips the task WDT in the app and the RTC WDT in the bootloader, which then reset-loops on the corrupted partition. Check that each segment header and its data lie inside the partition before processing the segment data.
Bootloader Support Component ============================ Overview -------- "Bootloader support" contains APIs which are used by the bootloader but are also needed for the main app. Code in this component needs to be aware of being executed in a bootloader environment (no RTOS available, BOOTLOADER_BUILD macro set) or in an esp-idf app environment (RTOS running, need locking support.)