Files
esp-idf/components/bootloader_support
Mahavir Jain 8829e6b864 fix(esp_image_verify): reject segments extending past the partition before hashing
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.
2026-10-11 14:30:19 +05:30
..

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.)