Skip to content

Commit 06f9814

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 111f165 commit 06f9814

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

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