Skip to content

os/arch/arm/src/armino:move signature verification code to ecode - #7675

Open
xiaotao-yuan wants to merge 1 commit into
Samsung:masterfrom
bekencorp:pr_ecode_signature
Open

xiaotao-yuan wants to merge 1 commit into
Samsung:masterfrom
bekencorp:pr_ecode_signature

Conversation

@xiaotao-yuan

Copy link
Copy Markdown
Contributor

move the file to Ecode, which corresponds to PR237

Signed-off-by: xiaotao.yuan <xiaotao.yuan@aclsemi.com>
@seokhun-eom24

Copy link
Copy Markdown
Contributor

🤖 AI Code Review · 32df2adbe4a1

PR Summary: The PR replaces the full ECDSA signature verification implementation in armino_signature.c with stub functions that unconditionally return SIGNATURE_VAILD, effectively disabling all kernel and user binary signature checks on the armino platform.

📋 Findings Overview (1 issue)

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_INVALID on any mismatch. The head version removes all verification logic and returns SIGNATURE_VAILD (0) at line 28 and line 33 regardless of input. Callers under CONFIG_BINARY_SIGNING (e.g. binary_manager_data.c:136 and binary_manager_load.c:202) treat SIGNATURE_VAILD as 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants