fix: backport security fixes from app-version branch#24
Closed
SlavaSereb wants to merge 1 commit into
Closed
Conversation
Security improvements:
- FireblocksSigner: Add externalTxId for idempotency (prevents duplicate signing)
- FireblocksSigner: Replace fixed 3s poll with exponential backoff (3s→30s)
- FireblocksSigner: Add 30-minute timeout to prevent infinite polling
- concatSignature: Validate v ∈ {0,1} (reject invalid recovery IDs)
- concatSignature: Validate signature length (128 hex chars)
- concatSignature: Normalize high-S signatures via @noble/secp256k1
- validateAddress: Support multisig addresses (SM/SN prefixes)
- untilBurnHeightForCycles: Fix off-by-one error in cycle calculation
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.
Summary
Backports critical security fixes from the
app-versionbranch tomainto ensure both branches have consistent security hardening.Security Improvements
FireblocksSigner.ts:
externalTxIdparameter for idempotent signing requests (prevents duplicate transactions on retry)helpers.ts:
concatSignature: Validate recovery ID v ∈ {0, 1} (reject malformed signatures)concatSignature: Validate signature is exactly 128 hex charactersconcatSignature: Normalize high-S signatures via@noble/secp256k1for node compatibilityvalidateAddress: Support multisig addresses (SM prefix for mainnet, SN for testnet)untilBurnHeightForCycles: Fix off-by-one error in PoX cycle calculationTest Plan
Related
These fixes address issues identified in the June 2026 security review. See
CODE_REVIEW_COMPREHENSIVE_JUNE_2026.mdin the app repo for full details.