Repository navigation
os/arch/arm/src/armino:move signature verification code to ecode - #7675
Open
xiaotao-yuan wants to merge 1 commit into
Open
xiaotao-yuan wants to merge 1 commit into
xiaotao-yuan wants to merge 1 commit into
Conversation
Signed-off-by: xiaotao.yuan <xiaotao.yuan@aclsemi.com>
Contributor
🤖 AI Code Review ·
|
| Severity | Category | Issue | Location |
|---|---|---|---|
| 🔴 High | Correctness | up_verify_kernelsignature and up_verify_usersignature unconditionally return success |
armino_signature.c:28 |
✅ Checked with no findings: Memory Leaks, Crashes, Hangs
🔍 Details & Suggested Fixes
1. [Correctness] up_verify_kernelsignature and up_verify_usersignature unconditionally return success
- Location:
os/arch/arm/src/armino/armino_signature.c#L28 - Evidence: The base implementation read the image header, calculated a SHA-256 hash over the image, parsed TLV-embedded public key and ECDSA signature, and returned
SIGNATURE_INVALIDon any mismatch. The head version removes all verification logic and returnsSIGNATURE_VAILD(0) at line 28 and line 33 regardless of input. Callers underCONFIG_BINARY_SIGNING(e.g.binary_manager_data.c:136andbinary_manager_load.c:202) treatSIGNATURE_VAILDas pass, so any kernel or user binary — including corrupted or unsigned firmware — now passes signature verification and proceeds to load. - Suggested fix: Restore the actual verification logic or guard the stub returns behind a Kconfig option so that configurations requiring signature checks do not silently bypass security.
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.
move the file to Ecode, which corresponds to PR237