[AUTO_UPDATE] Branch API_LEVEL_26 - #1653
Open
github-actions[bot] wants to merge 4 commits into
Open
Conversation
(cherry picked from commit 44d16b3)
(cherry picked from commit ac1c835)
New sdk-fuzz target `fuzz_nbgl_page` exercising the NBGL page/layout
construction layer (lib_nbgl/src/nbgl_page.c + nbgl_layout.c). That layer is
compiled from source and instrumented, while the display/HAL layer stays
mocked (fuzzing/mock/nbgl).
The harness builds a fuzzed nbgl_pageContent_t from the input tail and drives
three entry points:
- nbgl_pageDrawGenericContent with 6 content types (TAG_VALUE_LIST,
SWITCHES_LIST, INFOS_LIST, CHOICES_LIST, BARS_LIST, CENTERED_INFO)
- nbgl_pageDrawInfo
- nbgl_pageDrawConfirmation
Strings are carved from the tail into a bounded pool and item arrays are
clamped. No new link deps: secure_sdk already pulls in nbgl + the HAL mock.
(cherry picked from commit 8f94db5)
Found by SDK fuzzing (UBSan implicit-signed-integer-truncation): availableHeight is a uint16_t decremented by the height each list item consumes. When content is taller than the screen it underflows to a large value, defeating the `availableHeight > 10` guard meant to stop drawing separation lines near the bottom of the container. Make availableHeight signed (int) in addContent() and nbgl_pageDrawGenericContentExt(); the > 10 comparisons stay correct. (cherry picked from commit 6690175)
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
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.
Automated update from #1652 (Add blockchain family to trusted name)
Automated update from #1659 (Align mem_utils_calloc size)
Automated update from #1625 (First iterative step to extend Fuzzing framework coverage on NBGL (nbgl page addon))