mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
Merge branch 'doc/bootloader-anti-rollback-fix_v6.1' into 'release/v6.1'
fix(docs): Update bootloader anti-rollback documentation (v6.1) See merge request espressif/esp-idf!50837
This commit is contained in:
@@ -236,22 +236,26 @@ If the bootloader grows too large then it can collide with the partition table,
|
||||
I (67) boot: Partition Table:
|
||||
...
|
||||
|
||||
Anti-Rollback Feature
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
.. only:: SOC_BOOTLOADER_ANTI_ROLLBACK_SUPPORTED
|
||||
|
||||
The anti-rollback feature prevents downgrading to an older, potentially vulnerable bootloader version. The bootloader header includes a security version, defined by ``CONFIG_BOOTLOADER_SECURE_VERSION``. When ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_EN`` is set, the ROM bootloader checks this version against the value stored in ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION``. Only bootloaders with a version greater than or equal to the eFuse value are allowed to boot.
|
||||
Anti-Rollback Feature
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- The ROM bootloader can update the secure version in eFuse if ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION_UPDATE_IN_ROM`` is set.
|
||||
- The secure version value is incremented as new bootloader versions are deployed, and cannot be decreased.
|
||||
- If the secure version in eFuse is not updated in the ROM bootloader, then the application can update it using the :cpp:func:`esp_efuse_write_field_blob` function.
|
||||
The anti-rollback feature prevents downgrading to an older, potentially vulnerable bootloader version. The bootloader header includes a security version, defined by ``CONFIG_BOOTLOADER_SECURE_VERSION``. When ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_EN`` is set, the ROM bootloader checks this version against the value stored in ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION``. Only bootloaders with a version greater than or equal to the eFuse value are allowed to boot.
|
||||
|
||||
- The ROM bootloader can update the secure version in eFuse if ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION_UPDATE_IN_ROM`` is set.
|
||||
- The secure version value is incremented as new bootloader versions are deployed, and cannot be decreased.
|
||||
- If the secure version in eFuse is not updated in the ROM bootloader, then the application can update it using the :cpp:func:`esp_efuse_write_field_blob` function.
|
||||
|
||||
Relevant eFuses
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
- ``EFUSE_RECOVERY_BOOTLOADER_FLASH_SECTOR`` (12 bits): Flash sector address for the recovery bootloader. Default value is 0 (disabled), set any other value to enable, 0xFFF to permanently disable.
|
||||
- ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_EN`` (1 bit): Enables anti-rollback check in the ROM bootloader.
|
||||
- ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION`` (4 bits): Secure version for anti-rollback protection. The value increases as bits are set—0x0, 0x1, 0x3, 0x7, 0xF.
|
||||
- ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION_UPDATE_IN_ROM`` (1 bit): Allows the ROM bootloader to update the secure version in eFuse.
|
||||
.. list::
|
||||
|
||||
- ``EFUSE_RECOVERY_BOOTLOADER_FLASH_SECTOR`` (12 bits): Flash sector address for the recovery bootloader. Default value is 0 (disabled), set any other value to enable, 0xFFF to permanently disable.
|
||||
:SOC_BOOTLOADER_ANTI_ROLLBACK_SUPPORTED: - ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_EN`` (1 bit): Enables anti-rollback check in the ROM bootloader.
|
||||
:SOC_BOOTLOADER_ANTI_ROLLBACK_SUPPORTED: - ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION`` (4 bits): Secure version for anti-rollback protection. The value increases as bits are set—0x0, 0x1, 0x3, 0x7, 0xF.
|
||||
:SOC_BOOTLOADER_ANTI_ROLLBACK_SUPPORTED: - ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION_UPDATE_IN_ROM`` (1 bit): Allows the ROM bootloader to update the secure version in eFuse.
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
@@ -236,22 +236,26 @@ ESP-IDF 二级引导加载程序位于 flash 的 {IDF_TARGET_CONFIG_BOOTLOADER_O
|
||||
I (67) boot: Partition Table:
|
||||
...
|
||||
|
||||
防回滚功能
|
||||
^^^^^^^^^^
|
||||
.. only:: SOC_BOOTLOADER_ANTI_ROLLBACK_SUPPORTED
|
||||
|
||||
防回滚功能可防止降级到可能存在安全漏洞的旧版引导加载程序。引导加载程序头部包含安全版本号,由 ``CONFIG_BOOTLOADER_SECURE_VERSION`` 定义。设置 ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_EN`` 后,ROM 引导加载程序会将该安全版本号与 ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION`` 中存储的值进行比对。只有版本号大于或等于 eFuse 值的引导加载程序才允许启动。
|
||||
防回滚功能
|
||||
^^^^^^^^^^
|
||||
|
||||
- 如果设置了 ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION_UPDATE_IN_ROM``,ROM 引导加载程序可以更新 eFuse 中的安全版本号。
|
||||
- 随着新引导加载程序版本的发布,安全版本号会递增,且不能降低。
|
||||
- 如果 ROM 引导加载程序未更新 eFuse 中的安全版本号,则应用程序可以通过 :cpp:func:`esp_efuse_write_field_blob` 函数进行更新。
|
||||
防回滚功能可防止降级到可能存在安全漏洞的旧版引导加载程序。引导加载程序头部包含安全版本号,由 ``CONFIG_BOOTLOADER_SECURE_VERSION`` 定义。设置 ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_EN`` 后,ROM 引导加载程序会将该安全版本号与 ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION`` 中存储的值进行比对。只有版本号大于或等于 eFuse 值的引导加载程序才允许启动。
|
||||
|
||||
- 如果设置了 ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION_UPDATE_IN_ROM``,ROM 引导加载程序可以更新 eFuse 中的安全版本号。
|
||||
- 随着新引导加载程序版本的发布,安全版本号会递增,且不能降低。
|
||||
- 如果 ROM 引导加载程序未更新 eFuse 中的安全版本号,则应用程序可以通过 :cpp:func:`esp_efuse_write_field_blob` 函数进行更新。
|
||||
|
||||
相关 eFuse
|
||||
^^^^^^^^^^
|
||||
|
||||
- ``EFUSE_RECOVERY_BOOTLOADER_FLASH_SECTOR`` (12 位):恢复引导加载程序的 flash 扇区地址。默认值为 0(禁用),设置为其他值则启用,设置为 0xFFF 时永久禁用。
|
||||
- ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_EN`` (1 位):在 ROM 引导加载程序中启用防回滚检查。
|
||||
- ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION`` (4 位):防回滚保护的安全版本号。该值随位数增加而递增—0x0、0x1、0x3、0x7、0xF。
|
||||
- ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION_UPDATE_IN_ROM`` (1 位):允许 ROM 引导加载程序更新 eFuse 中的安全版本号。
|
||||
.. list::
|
||||
|
||||
- ``EFUSE_RECOVERY_BOOTLOADER_FLASH_SECTOR`` (12 位):恢复引导加载程序的 flash 扇区地址。默认值为 0(禁用),设置为其他值则启用,设置为 0xFFF 时永久禁用。
|
||||
:SOC_BOOTLOADER_ANTI_ROLLBACK_SUPPORTED: - ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_EN`` (1 位):在 ROM 引导加载程序中启用防回滚检查。
|
||||
:SOC_BOOTLOADER_ANTI_ROLLBACK_SUPPORTED: - ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION`` (4 位):防回滚保护的安全版本号。该值随位数增加而递增—0x0、0x1、0x3、0x7、0xF。
|
||||
:SOC_BOOTLOADER_ANTI_ROLLBACK_SUPPORTED: - ``EFUSE_BOOTLOADER_ANTI_ROLLBACK_SECURE_VERSION_UPDATE_IN_ROM`` (1 位):允许 ROM 引导加载程序更新 eFuse 中的安全版本号。
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
Reference in New Issue
Block a user