Skip to content

Commit 5824fa4

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 3543eb7 commit 5824fa4

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

boot/zephyr/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,6 +1130,18 @@ config MCUBOOT_BOOT_BANNER
11301130
config BOOT_BANNER_STRING
11311131
default "Using Zephyr OS build" if MCUBOOT_BOOT_BANNER
11321132

1133+
config MCUBOOT_USE_TLV_ALLOW_LIST
1134+
bool "Check unprotected TLVs against allow list"
1135+
default y
1136+
help
1137+
Every unprotected TLV will be checked against list of allowed TLVs,
1138+
which is compiled in and depends on configuration; an image that
1139+
contain TLV not present on the list will be automaticaly rejected.
1140+
This is additional check, as MCUboot will not be parsing TLVs it
1141+
has not been compiled to parse in the first place.
1142+
Disabling this option will cut down MCUboot size.
1143+
The Kconfig controlls MCUboot configuration option MCUBOOT_USE_TLV_ALLOW_LIST.
1144+
11331145
config BOOT_DECOMPRESSION_SUPPORT
11341146
bool
11351147
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

ext/mbedtls

0 commit comments

Comments
 (0)