Improve ARMORED code + minor fixes#665
Merged
dgarske merged 12 commits intowolfSSL:masterfrom Jan 14, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances fault mitigation in ARMORED mode with improved redundancy checks, adds ARMORED support for ML_DSA signature verification, fixes rollback handling bugs, and reconfigures STM32 TrustZone SAU regions to set the UPDATE partition as secure.
Changes:
- Enhanced ARMORED mode with additional redundancy in signature verification and version checking
- Added redundant verification checks for ML_DSA signatures when ARMORED=1
- Fixed rollback logic to properly handle version checks and state transitions with ARMORED enabled
- Reconfigured STM32_TZ SAU to mark UPDATE partition as secure and adjusted flash region mappings
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/test.mk | Updated size limits for test targets to accommodate increased code size from ARMORED enhancements |
| src/update_flash.c | Added rollback detection logic, refactored version check to work with ARMORED, and improved rollback state handling |
| src/image.c | Added ARMORED redundancy checks to ML_DSA verification and updated signature verification macros |
| include/image.h | Refactored VERIFY_VERSION_ALLOWED macro for both GCC and IAR with improved redundancy and changed signed to unsigned comparisons |
| hal/stm32_tz.c | Reconfigured SAU regions to mark UPDATE partition as secure with dynamic flash_top_secure calculation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
rizlik
requested changes
Jan 12, 2026
- update partition is now secure, only accessible via NSC - removed legacy security settings in hal_flash_write/erase when running in secure mode - Added explicit IMAGE_HEADER_SIZE to default config
rizlik
requested changes
Jan 14, 2026
rizlik
previously approved these changes
Jan 14, 2026
dgarske
previously approved these changes
Jan 14, 2026
mattia-moffa
approved these changes
Jan 14, 2026
dgarske
approved these changes
Jan 14, 2026
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.
ARMORED=1
STM32_TZ SAU:
Fixes: