Repository navigation
fix: validate BLS threshold identifier lengths - #7813
PastaPastaPasta wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 41 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Final review complete — no blockers (commit 8886953) · triage: low |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
The native guards reject short identifiers before the fixed-size reads, and all three safe Rust recovery methods validate lengths before entering FFI. The changes preserve longer identifiers’ first-32-byte interpretation and existing Dash callers, with regression tests covering all affected types and recovery positions. This was a static review only: the supplied CI snapshot shows successful lint and multiple platform builds, while Linux tests and Windows, sanitizer, and multiprocess builds remain pending.
Review provenance
Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: dash-core-commit-history); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
lowbygpt-6.1-sol(effort low) — The diff adds straightforward minimum-length guards to native and safe Rust BLS threshold APIs with focused contract tests, without changing cryptographic algorithms or valid-identifier behavior. - Phase 1 reviewers:
glm-5.3-flash— general (completed, effort high); agentphase1-reviewer - Phase 1 model:
glm-5.3-flash— zai quota: 5h 98% left, weekly 96% left; passed overgemini-3.8-flash-high(antigravity below 15% reserve: weekly 15% left, 5h 100% left) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.1-sol— dash-core-commit-history (completed, effort medium); agentphase2-reviewer
PastaPastaPasta
left a comment
There was a problem hiding this comment.
NACK; dashbls is a vendor project; changes must go to dashpay/bls-signatures, not be made in repo here
|
Moved this library-only change to dashpay/bls-signatures#134, based on the exact Closing this direct vendor-edit PR as superseded. Once the library change is accepted upstream, Dash should receive it through the normal vendor import. The upstream PR is now linked and watched here. 🤖 Posted autonomously by Codex on behalf of pasta. |
Issue being fixed or feature implemented
The vendored BLS library's native threshold sharing/recovery APIs read the first 32 identifier bytes without checking the declared length, and safe Rust recovery accepts arbitrary identifier vectors before calling a C API without per-identifier lengths. Check these contracts before the read. Dash Core uses fixed 32-byte identifiers, whose behavior is unchanged; a daemon attack path has not been established.
What was done?
How Has This Been Tested?
On Apple Silicon macOS, configured a fresh worktree from develop
f35a24cfca126e3f910f2ffe85d2609b06bc9602with the prebuilt depends prefix:make -C src/dashbls -j1; full nativeruntest: 1,455 assertions across 17 cases passed.cargo test --manifest-path rust-bindings/bls-signatures/Cargo.toml -j1 -- --test-threads=1: all 24 Rust tests passed. Used a disposable copy of the current source, restoring only the matching vendored revision's ignored Relic CMake configuration template for build setup and capping the CMake build to one job.make -j2andtest_dash --run_test=bls_testspassed.git diff --check, and an independent four-pass source review passed.Breaking Changes
Unsupported identifiers shorter than 32 bytes now return ordinary errors. Valid identifiers, including longer inputs interpreted through their first 32 bytes, retain existing behavior. Raw C callers must still supply readable buffers because that API has no per-identifier length parameter.
Checklist:
This pull request was created by Codex.