Skip to content

Commit 0253b08

Browse files
committed
[nrf fromtree] 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]> (cherry picked from commit 3eb23a5)
1 parent c081281 commit 0253b08

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
@@ -1214,6 +1214,18 @@ config MCUBOOT_BOOT_BANNER
12141214
config BOOT_BANNER_STRING
12151215
default "Using Zephyr OS build" if MCUBOOT_BOOT_BANNER
12161216

1217+
config MCUBOOT_USE_TLV_ALLOW_LIST
1218+
bool "Check unprotected TLVs against allow list"
1219+
default y
1220+
help
1221+
Every unprotected TLV will be checked against list of allowed TLVs,
1222+
which is compiled in and depends on configuration; an image that
1223+
contain TLV not present on the list will be automaticaly rejected.
1224+
This is additional check, as MCUboot will not be parsing TLVs it
1225+
has not been compiled to parse in the first place.
1226+
Disabling this option will cut down MCUboot size.
1227+
The Kconfig controlls MCUboot configuration option MCUBOOT_USE_TLV_ALLOW_LIST.
1228+
12171229
config BOOT_DECOMPRESSION_SUPPORT
12181230
bool
12191231
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)