Quantstamp reviewed Datachain (Datachain - LCPs) on 9 Dec 2024: 7 findings, 0 critical; all marked fixed.
Report hosted on certificate.quantstamp.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 0 | 0 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 0 | 0 | 7 |
The function `get_quote()` in `ias_utils.rs` uses `rand::thread_rng()` which provides a pseudorandom value in each thread independently which might not be as robust or secure as desired.
The [Cargo audit](https://github.com/RustSec/rustsec/tree/main/cargo-audit) report has identified potential dependency risks. Here is a summary of the risks: **Key Vulnerabilities:** 1. **curve25519-dalek (v3.2.0)** - **Issue**: Timing variability in `Scalar29::sub` and `Scalar52::sub`. - **Solution**: Upgrade to version >= 4.1.3. - **Link**: [RUSTSEC-2024-0344](https://rustsec.org/advisories/RUSTSEC-2024-0344) 2. **ed25519-dalek (v1.0.1)** - **Issue**: Double Public Key Signing Function Oracle Attack. - **Solution**: Upgrade to version >= 2. - **Link**: [RUSTSEC-2022-0093](https://rustsec.org/advisories/RUSTSEC-2022-0093) 3. **h2 (v0.3.19)** - **Issue**: CONTINUATION Flood vulnerability causing service degradation. - **Solution**: Upgrade to ^0.3.26 or >= 0.4.4. - **Link**: [RUSTSEC-2024-0332](https://rustsec.org/advisories/RUSTSEC-2024-0332) 4. **libgit2-sys (v0.15.2)** - **Issue**: Memory corruption, denial of service, and arbitrary code execution. - **Solution**: Upgrade to version >= 0.16.2. - **Link**: [RUSTSEC-2024-0013](https://rustsec.org/advisories/RUSTSEC-2024-0013) 5. **rsa (v0.9.2)** - **Issue**: Timing side-channel vulnerability (Marvin Attack). - **Solution**: No available fix. - **Link**: [RUSTSEC-2023-0071](https://rustsec.org/advisories/RUSTSEC-2023-0071) 6. **rustls (v0.19.1 and v0.20.6)** - **Issue**: Infinite loop vulnerability in network input handling. - **Solution**: Upgrade to specific patched versions. - **Link**: [RUSTSEC-2024-0336](https://rustsec.org/advisories/RUSTSEC-2024-0336) 7. **shlex (v1.1.0)** - **Issue**: Quote API issues. - **Solution**: Upgrade to version >= 1.3.0. - **Link**: [RUSTSEC-2024-0006](https://rustsec.org/advisories/RUSTSEC-2024-0006) 8. **tungstenite (v0.17.3)** - **Issue**: Denial of service vulnerability. - **Solution**: Upgrade to version >= 0.20.1. - **Link**: [RUSTSEC-2023-0065](https://rustsec.org/advisories/RUSTSEC-2023-0065) 9. **webpki (v0.21.4)** - **Issue**: CPU exhaustion in certificate path building. - **Solution**: Upgrade to version >= 0.22.2. - **Link**: [RUSTSEC-2023-0052](https://rustsec.org/advisories/RUSTSEC-2023-0052) **Other Warnings:** 1. Unmaintained Crates: Several crates, including `atty`, `buf_redux`, `mach`, and `multipart`, are unmaintained and may need replacement. 2. Yanked Crates: Some crates, such as `futures-util` and `hermit-abi`, are marked as yanked. <br> **Additionally**, we have manually identified some outdated dependencies that can be upgraded: 1. The codebase is using the `tiny_keccak` library version 1.5, while the latest version is 2.0.2 ([crates.io](https://crates.io/crates/tiny-keccak)). 2. It is also using `sha2` version 0.10.6, while the latest is 0.10.8. 3. The API version used for the attestation mechanism is v4, while the latest is v5. We recommend addressing these vulnerabilities and updating the outdated dependencies to enhance the security and reliability of the project.
The enclave key currently remains in memory after it is unsealed and used. Since it represents the critical source of trust in the system, limiting its exposure to hardware level attacks is recommended.
The panic handler added to this forked crate makes use of `ocall` to pass panic information outside of the enclave, simply forwarding the info associated with the panic.
The `calc_raw_sealed_data_size()` function returns `max` when there is an unexpected size. This is a copy of the implementation from the [sgx_tseal/src/internal.rs](https://github.com/apache/incubator-teaclave-sgx-sdk/blob/1b1d03376056321441ef99716aa0888bd5ef19f7/sgx_tseal/src/internal.rs#L97-L109). However, in the Rust SGX SDK, it will error out (see: [code](https://github.com/apache/incubator-teaclave-sgx-sdk/blob/1b1d03376056321441ef99716aa0888bd5ef19f7/sgx_tseal/src/internal.rs#L301)) at the place calling when receiving the `max` output. We suggest that the same should be applied here.
The `LCPUtils.readBytesUntil()` function calls the `BytesUtils.find()` function. The `BytesUtils.find()` function has the `len` input, which represents the number of bytes to search (see: [code comment](https://github.com/ensdomains/ens-contracts/blob/160919f5612e52347f016a537c6278ecc0f2325a/contracts/dnssec-oracle/BytesUtils.sol#L383)). The current implementation passes `src.length` as the `len` input, which will trigger a panic when the needle is not found, as it will attempt to search outside of `src.length`. There is no real impact feature-wise, as `readBytesUntil()` intends to revert with `LCPUtilsReadBytesUntilNotFound()` when the needle is not found. However, it might make it hard to identify the reason for a failed transaction.
The `verify_signature()` function uses `Signature::parse_overflowing_slice()`, which is not recommended according to its [code comment](https://github.com/paritytech/libsecp256k1/blob/48dabd8821852c5fe00b846f6c37e1f6b05c3d8c/src/lib.rs#L558-L560). The code comment recommends using `parse_standard_slice()` instead.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (100)
236 projects reviewed · 332 reports · latest Oct 2026
See Quantstamp’s auditsSomething wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.
Tell us