mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
fc29190dba
The bounds check `pos->offset + pos->size > chip_size` can silently wrap around when both offset and size are large uint32_t values, bypassing the validation entirely. Use `pos->size > chip_size - pos->offset` instead, which is safe because pos->offset <= chip_size is already verified by the first condition in the same expression. Found via https://github.com/Eun0us/esp-fuzzer
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.)