Skip to content

Commit cf4c1da

Browse files
committed
zephyr: Kconfig to control MCUBOOT_USE_TLV_ALLOW_LIST
The commit adds Kconfig MCUBOOT_USE_TLV_ALLOW_LIST that allows to control MCUboot config option MCUBOOT_USE_TLV_ALLOW_LIST. The Kconfig is set to y, by default, to keep legacy behaviour. Signed-off-by: Dominik Ermel <[email protected]>
1 parent ec93229 commit cf4c1da

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

boot/zephyr/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,6 +1146,18 @@ config MCUBOOT_BOOT_BANNER
11461146
config BOOT_BANNER_STRING
11471147
default "Using Zephyr OS build" if MCUBOOT_BOOT_BANNER
11481148

1149+
config MCUBOOT_USE_TLV_ALLOW_LIST
1150+
bool "Check unprotected TLVs against allow list"
1151+
default y
1152+
help
1153+
Every unprotected TLV will be checked against list of allowed TLVs,
1154+
which is compiled in and depends on configuration; an image that
1155+
contain TLV not present on the list will be automaticaly rejected.
1156+
This is additional check, as MCUboot will not be parsing TLVs it
1157+
has not been compiled to parse in the first place.
1158+
Disabling this option will cut down MCUboot size.
1159+
The Kconfig controlls MCUboot configuration option MCUBOOT_USE_TLV_ALLOW_LIST.
1160+
11491161
config BOOT_DECOMPRESSION_SUPPORT
11501162
bool
11511163
help

boot/zephyr/include/mcuboot_config/mcuboot_config.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@
150150
#define MCUBOOT_HAVE_LOGGING 1
151151
#endif
152152

153+
/* Enable/disable non-protected TLV check against allow list */
154+
#ifdef CONFIG_MCUBOOT_USE_TLV_ALLOW_LIST
155+
#define MCUBOOT_USE_TLV_ALLOW_LIST 1
156+
#endif
157+
153158
#ifdef CONFIG_BOOT_ENCRYPT_RSA
154159
#define MCUBOOT_ENC_IMAGES
155160
#define MCUBOOT_ENCRYPT_RSA

0 commit comments

Comments
 (0)