paritition_table: Verify the partition table md5sum when loading the app

Additionally, always enable the partition MD5 check if flash encryption is on in
Release mode. This ensures the partition table ciphertext has not been modified
(CVE-2021-27926).

The exception is pre-V3.1 ESP-IDF bootloaders and partition tables, which
don't have support for the MD5 entry.
This commit is contained in:
Angus Gratton
2021-05-18 01:32:59 +00:00
committed by bot
parent f1caa2971d
commit ede477ea65
9 changed files with 128 additions and 28 deletions
@@ -121,6 +121,7 @@ menu "Partition Table"
config PARTITION_TABLE_MD5
bool "Generate an MD5 checksum for the partition table"
default y
depends on !ESP32_COMPATIBLE_PRE_V3_1_BOOTLOADERS
help
Generate an MD5 checksum for the partition table for protecting the
integrity of the table. The generation should be turned off for legacy