Skip to content

Commit 3eb23a5

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 <dominik.ermel@nordicsemi.no>
1 parent a13624f commit 3eb23a5

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
@@ -1169,6 +1169,18 @@ config MCUBOOT_BOOT_BANNER
11691169
config BOOT_BANNER_STRING
11701170
default "Using Zephyr OS build" if MCUBOOT_BOOT_BANNER
11711171

1172+
config MCUBOOT_USE_TLV_ALLOW_LIST
1173+
bool "Check unprotected TLVs against allow list"
1174+
default y
1175+
help
1176+
Every unprotected TLV will be checked against list of allowed TLVs,
1177+
which is compiled in and depends on configuration; an image that
1178+
contain TLV not present on the list will be automaticaly rejected.
1179+
This is additional check, as MCUboot will not be parsing TLVs it
1180+
has not been compiled to parse in the first place.
1181+
Disabling this option will cut down MCUboot size.
1182+
The Kconfig controlls MCUboot configuration option MCUBOOT_USE_TLV_ALLOW_LIST.
1183+
11721184
config BOOT_DECOMPRESSION_SUPPORT
11731185
bool
11741186
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)