Skip to content

fix: Out-of-bounds read from unbounded NodeSeed.seed in prepared transaction signing - #41

Merged
agrojean-ledger merged 3 commits into
developfrom
security/merlin-88e7a8b
Apr 23, 2026
Merged

agrojean-ledger merged 3 commits into
developfrom
security/merlin-88e7a8b

Conversation

@donjon-cerberus-sandbox

@donjon-cerberus-sandbox donjon-cerberus-sandbox Bot commented Apr 15, 2026

Copy link
Copy Markdown

Summary

Automated security fix for Out-of-bounds read from unbounded NodeSeed.seed in prepared transaction signing (High).

CWE: CWE-CWE-125
OWASP: A03:2021-Injection
Fix Confidence: high

What Changed

Validated node seed presence and length before hashing in prepared transaction node parsing. Create nodes now reject malformed matching seeds, and exercise nodes now reject missing or malformed seeds before any 32-byte hash encoding can read past the protobuf allocation.

Caveats

  • This change hardens the runtime parser path; the nanopb codegen boundary for NodeSeed.seed remains unconstrained in the current generated protobuf artifacts.

Verification Checklist

  • Review the code change
  • Run tests to verify no regression
  • Verify the vulnerability is addressed — already verified by Cerberus Sentinel

Created by Cerberus Merlin

Cerberus Merlin added 2 commits April 15, 2026 09:56

@agrojean-ledger agrojean-ledger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking seed presence and length is warranted.

encode_hash on the seed unconditionally reads exactly SHA256_HASH_LEN bytes from whatever pointer is passed. So enforcing the length when decoding the serialized transaction is relevant.

@agrojean-ledger
agrojean-ledger merged commit 26a343c into develop Apr 23, 2026
61 checks passed
@agrojean-ledger
agrojean-ledger deleted the security/merlin-88e7a8b branch April 23, 2026 08:45
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.

1 participant