-
Notifications
You must be signed in to change notification settings - Fork 798
Series of commits that exposes control over TLV allow list #2410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
de-nordic
wants to merge
4
commits into
mcu-tools:main
Choose a base branch
from
de-nordic:tlv-allow-list-control
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nordicjm
requested changes
Aug 1, 2025
docs/design.md
Outdated
@@ -136,6 +136,14 @@ The `ih_hdr_size` field indicates the length of the header, and therefore the | |||
offset of the image itself. This field provides for backwards compatibility in | |||
case of changes to the format of the image header. | |||
|
|||
## [TLV allow list](#tlv-allow) | |||
|
|||
While reading TLVs from an image, MCUboot will try to match them against list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*unprotected
nordicjm
reviewed
Aug 1, 2025
f14b7b4
to
ae94217
Compare
ffff23f
to
d20c3e1
Compare
The ALLOW_ROGUE_TLVS is used to turn off TLV filtering in code, basically to prevent processing TLVs that MCUboot is not compiled to serve anyway. The commit replaces identifier ALLOW_ROGUE_TLVS with MCUBOOT_USE_TLV_ALLOW_LIST and reverse the logic around it, as it now means opposite to the original. This gives the feature an identifier in style of the mcuboot_config.h defined identifiers. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
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>
Add #define MCUBOOT_USE_TLV_ALLOW_LIST 1, to keep behaviour where TLVs are matched against list of allowed TLVs, before being processed. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Add information on TLV allow list and MCUBOOT_USE_TLV_ALLOW_LIST, MCUboot configuration identifier that controls its usage. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
d20c3e1
to
d84226d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously allow list was controller with define ALLOW_ROGUE_TLVS; this commit changes the name to MCUBOOT_USE_TLV_ALLOW_LIST and reverses the logic.
The config has been added to each mcuboot_config.h, with value set 1, to keep existing behaviour.
Zephyr has now Kconfig that can be used to disable the list, it is enabled by default.
Disabling the allow list reduces slightly MCUboot size.
Builds with allow list:
and without