-
Notifications
You must be signed in to change notification settings - Fork 136
Improve ARMORED code + minor fixes #665
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
Conversation
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.
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>
- 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
dgarske
left a comment
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.
Nice!
ARMORED=1
STM32_TZ SAU:
Fixes: