Skip to content

Commit b25fe83

Browse files
committed
[nrf fromlist] 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. Upstream PR #: 2410 Signed-off-by: Dominik Ermel <[email protected]>
1 parent 00d3b17 commit b25fe83

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
@@ -1158,6 +1158,18 @@ config MCUBOOT_BOOT_BANNER
11581158
config BOOT_BANNER_STRING
11591159
default "Using Zephyr OS build" if MCUBOOT_BOOT_BANNER
11601160

1161+
config MCUBOOT_USE_TLV_ALLOW_LIST
1162+
bool "Check unprotected TLVs against allow list"
1163+
default y
1164+
help
1165+
Every unprotected TLV will be checked against list of allowed TLVs,
1166+
which is compiled in and depends on configuration; an image that
1167+
contain TLV not present on the list will be automaticaly rejected.
1168+
This is additional check, as MCUboot will not be parsing TLVs it
1169+
has not been compiled to parse in the first place.
1170+
Disabling this option will cut down MCUboot size.
1171+
The Kconfig controlls MCUboot configuration option MCUBOOT_USE_TLV_ALLOW_LIST.
1172+
11611173
config BOOT_DECOMPRESSION_SUPPORT
11621174
bool
11631175
depends on NRF_COMPRESS && NRF_COMPRESS_DECOMPRESSION && (NRF_COMPRESS_LZMA_VERSION_LZMA1 || NRF_COMPRESS_LZMA_VERSION_LZMA2)

boot/zephyr/include/mcuboot_config/mcuboot_config.h

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

151+
/* Enable/disable non-protected TLV check against allow list */
152+
#ifdef CONFIG_MCUBOOT_USE_TLV_ALLOW_LIST
153+
#define MCUBOOT_USE_TLV_ALLOW_LIST 1
154+
#endif
155+
151156
#ifdef CONFIG_BOOT_ENCRYPT_RSA
152157
#define MCUBOOT_ENC_IMAGES
153158
#define MCUBOOT_ENCRYPT_RSA

0 commit comments

Comments
 (0)