Summary
100% of all REPORTED Findings have been addressed
- 0Risk Accepted
- 14Not Applicable
- 13Solved
- 27All Findings
- Critical4
- 4Solved
- High1
- 1Solved
- Medium5
- 3Solved
- 2N/A
- Low12
- 8N/A
- 4Solved
- Informational5
- 4N/A
- 1Solved
Introduction#
Holonym engaged Halborn to perform a security assessment of their Rust codebase from September 2, 2024, to September 27, 2024. The assessment focused on the specific crates listed in the provided GitHub repository and included relevant commit hashes. More details can be found in the Scope section of this report.
Assessment Summary#
The Halborn team was allocated four weeks for the engagement and assigned a full-time security engineer to assess the security of the crates and the overall codebase. The security engineer is an expert in blockchain and smart contract security, with advanced skills in penetration testing and smart contract auditing, as well as extensive knowledge of various blockchain protocols.
The purpose of this assessment is to:
Ensure that codebase functions operate as intended
Identify potential security issues within codebase
Test Approach and Methodology#
Halborn Performed a combination of the manual view of the code and automated security testing to balance efficiency, timeliness, practicality, and accuracy regarding the scope of the codebase assessment. While manual testing is recommended to uncover flaws in logic, process, and implementation, automated testing techniques. They can quickly identify items that do not follow security best practices. The following phases and associated tools were used throughout the term of the assessment:
Research on the architecture, purpose, and usage of the Human network.
Manual code reading and walkthroughs to gain an understanding of the overall design and potential vulnerabilities.
Manual assessment of critical Rust variables and functions to identify arithmetic-related vulnerabilities.
Testing for race conditions and thread safety in the Rust actor framework.
Audit of the DKG (Distributed Key Generation) cryptographic protocol to ensure robustness against potential attacks.
Review of libp2p configuration and security to validate network communication integrity.
Security testing of cryptographic primitives to ensure they meet industry standards.
Scanning Rust files for vulnerabilities using Cargo Audit, identifying outdated dependencies and known security issues.
Checking for unsafe code usage with Cargo Geiger to minimize risks associated with unsafe Rust features.
Analysis of node communication and message integrity to mitigate risks from malicious nodes.
Review of error handling and logging practices to ensure sensitive information is not exposed.
Testing for denial-of-service vulnerabilities and resilience against resource exhaustion attacks.
Risk Methodology#
4.1 EXPLOITABILITY
Attack Origin (AO):
Attack Cost (AC):
Attack Complexity (AX):
Metrics:
| EXPLOITABILITY METRIC () | METRIC VALUE | NUMERICAL VALUE |
|---|---|---|
| Attack Origin (AO) | Arbitrary (AO:A) | 1 |
| Specific (AO:S) | 0.2 | |
| Attack Cost (AC) | Low (AC:L) | 1 |
| Medium (AC:M) | 0.67 | |
| High (AC:H) | 0.33 | |
| Attack Complexity (AX) | Low (AX:L) | 1 |
| Medium (AX:M) | 0.67 | |
| High (AX:H) | 0.33 |
4.2 IMPACT
Confidentiality (C):
Integrity (I):
Availability (A):
Deposit (D):
Yield (Y):
Metrics:
| IMPACT METRIC () | METRIC VALUE | NUMERICAL VALUE |
|---|---|---|
| Confidentiality (C) | None (C:N) | 0 |
| Low (C:L) | 0.25 | |
| Medium (C:M) | 0.5 | |
| High (C:H) | 0.75 | |
| Critical (C:C) | 1 | |
| Integrity (I) | None (I:N) | 0 |
| Low (I:L) | 0.25 | |
| Medium (I:M) | 0.5 | |
| High (I:H) | 0.75 | |
| Critical (I:C) | 1 | |
| Availability (A) | None (A:N) | 0 |
| Low (A:L) | 0.25 | |
| Medium (A:M) | 0.5 | |
| High (A:H) | 0.75 | |
| Critical (A:C) | 1 | |
| Deposit (D) | None (D:N) | 0 |
| Low (D:L) | 0.25 | |
| Medium (D:M) | 0.5 | |
| High (D:H) | 0.75 | |
| Critical (D:C) | 1 | |
| Yield (Y) | None (Y:N) | 0 |
| Low (Y:L) | 0.25 | |
| Medium (Y:M) | 0.5 | |
| High (Y:H) | 0.75 | |
| Critical (Y:C) | 1 |
4.3 SEVERITY COEFFICIENT
Reversibility (R):
Scope (S):
Metrics:
| SEVERITY COEFFICIENT () | COEFFICIENT VALUE | NUMERICAL VALUE |
|---|---|---|
| Reversibility () | None (R:N) | 1 |
| Partial (R:P) | 0.5 | |
| Full (R:F) | 0.25 | |
| Scope () | Changed (S:C) | 1.25 |
| Unchanged (S:U) | 1 |
| Critical | High | Medium | Low | Informational |
| 9 - 10 | 7 - 8.9 | 4.5 - 6.9 | 2 - 4.4 | 0 - 1.9 |
Scope#
Assessment Summary & Findings Overview#
# | Title | Severity | Score | Status |
|---|---|---|---|---|
| Unrestricted Growth of PubkeyShares HashMap Can Lead to Out-of-Memory (OOM) | Critical | 10.0 | Solved03/08/2025 | |
| Message::ForwardMulRequest Potential DDoS | Critical | 10.0 | Solved06/04/2025 | |
| Inadequate Validation of Messages in DKG Protocol | Critical | 10.0 | Solved03/08/2025 | |
| Deadlock in DKG | Critical | 10.0 | Solved03/08/2025 | |
| Lack of Validation for Threshold Parameters in update_threshold Function | High | 7.5 | Solved02/13/2025 | |
| Incorrect Threshold Check for Multiplication Verification in process_verification Function | Medium | 5.0 | Solved03/08/2025 | |
| Incomplete Election State Update and Lack of Error Handling in conduct_election Function | Medium | 5.0 | Not Applicable03/08/2025 | |
| Panic in Polynomial Generation from Seed | Medium | 5.0 | Solved06/11/2025 | |
| Out-of-Bounds Access Due to Empty Vectors | Medium | 5.0 | Not Applicable03/08/2025 | |
| Missing t,n Validation in Network Initialization | Medium | 5.0 | Solved03/08/2025 | |
| Non-Constant Time Cryptographic Operations In PointTrait | Low | 2.5 | Not Applicable03/08/2025 | |
| Missing Error Handling for encode() in process_verification Function | Low | 2.5 | Not Applicable03/08/2025 | |
| Lack of I/O Lock for File Operations in StoreKeyShares Handling | Low | 2.5 | Not Applicable03/08/2025 | |
| Missing Synchronization for Shared State in ElectionEngineState | Low | 2.5 | Not Applicable03/08/2025 | |
| Insecure RNG for Polynomial Coefficients | Low | 2.5 | Not Applicable03/08/2025 | |
| Sensitive Data Exposure Through Logging of Seed Value | Low | 2.5 | Solved10/10/2024 | |
| Misconfigurations in gossip Initialization | Low | 2.5 | Solved03/08/2025 | |
| Lack of Peer Blacklisting in Gossipsub Engine | Low | 2.5 | Solved03/08/2025 | |
| Unchecked Return Values in Request and Subscription Handlers | Low | 2.5 | Not Applicable03/08/2025 | |
| Insufficient Error Handling in handle_store_reshared_received_pubshare | Low | 2.5 | Solved06/04/2025 | |
| Missing Update of Total Nodes in add_node Function | Low | 2.5 | Not Applicable03/08/2025 | |
| Multiple Overflows in Polynomial Operations | Low | 2.5 | Not Applicable03/08/2025 | |
| Invalid Threshold Calculation in calculate_threshold Function | Informational | — | Not Applicable03/08/2025 | |
| Function Naming and State Update Issue in check_election_status | Informational | — | Not Applicable03/08/2025 | |
| Missing Degree Constraints in Polynomial Creation Function | Informational | — | Solved06/01/2025 | |
| Insecure Fallback to Local Random Number Generation | Informational | — | Not Applicable03/08/2025 | |
| Use of Non-Cryptographically Secure Random Number Generators in dkg nodes | Informational | — | Not Applicable03/08/2025 |
Findings & Tech Details#
Description
Recommendation
Remediation Comment
Description
Recommendation
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Proof of Concept
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
8. Automated Testing#
Disclaimer#
Halborn strongly recommends conducting a follow-up assessment of the project either within six months or immediately following any material changes to the codebase, whichever comes first. This approach is crucial for maintaining the project’s integrity and addressing potential vulnerabilities introduced by code modifications.
