fix: validate mirror quorum against snapshot weights#76
Conversation
|
Reviewer note (unable to submit a formal "request changes" review because GitHub treats this as my own PR): Thanks for turning around the audit fixes quickly. High-1 is addressed correctly by switching the mirror service-manager quorum check to cross multiplication, which avoids the floor-rounding bypass. I recommend changes for High-2: the PR currently calls Required fix:
Validation performed locally:
Once |
|
Re-review of c99b7ac (unable to submit formal approval because GitHub treats this as my own PR): the requested High-2 fix is now implemented correctly. Verified:
Local validation:
CI was still pending for off-chain tests/rust linting at review time; please wait for those checks before merge. |
Summary
Fixes the two high-severity mirror quorum findings from the v1 security audit:
signature_data.reference_block, matching signer and operator weight snapshot reads.Security impact
Prevents under-quorum acceptance for non-divisible totals such as 1-of-2 passing a 2/3 threshold, and prevents historical envelopes from being validated against latest total voting power while signer weights are evaluated at the reference block.
Testing
cargo fmtcargo test --workspace --all-targetsattempted, but the sandbox is missing OpenSSL pkg-config metadata required byopenssl-sys:Could not find openssl via pkg-configNo package 'openssl' found