# Rust dependency review — October 9, 2026 **Last updated:** 2026-10-09 (Asia/Ho_Chi_Minh). The escrow workspace upgrades Anchor Lang/SPL from 0.30.1 to exact 0.32.1, keeps Ephemeral Rollups SDK at exact 0.2.12, and removes the six previously affected package versions from the application lockfile. Cargo audit reports **zero known vulnerabilities and two informational unmaintained-package warnings**. Host checks, the recovery-library comparison, the SBPFv3 build, client ABI checks and 19 exact-artifact Kamino lifecycle checks passed. No mainnet deployment, funding or money movement is established by this work. The separate npm remediation was merged in PR #974 at `727ecc3f2bcf9695f8c222bb1f1dc6f02dd11934`. Its production/full-tree audits report zero advisories, strict lint reports zero errors and warnings, all 24 guards pass, and CI reports 3,693 passing tests. Those web checks do not audit the Cargo graph. See [supply-chain triage](supply-chain-triage.md). ## Candidate scope and compatibility The isolated candidate is retained at `/Users/rvaclassic/uplift-release/rust-migration-2026-10-09`. It was created without environment files, deployment keys, signing keys or wallet files. `EXPERIMENT.md`, `candidate.patch`, `baseline-source-sha256.json` and `candidate-manifest-sha256.json` preserve its source and command evidence. The candidate has been adopted into the tracked workspace under `anchor/`; its root `Cargo.lock` is the application resolution source of truth. | Component | Candidate | Reason and scope | | --- | --- | --- | | `anchor-lang`, `anchor-spl` | Exact `0.32.1`; compatible proc macros resolve to `0.32.2` | Removes the old framework dependency paths. `Anchor.toml` pins CLI 0.32.1. | | Anchor SPL features | `token`, `token_2022`, `associated_token`; defaults disabled | `token_2022` is required by generated constraints even for the existing classic-token accounts. Associated-token checks remain enabled. | | `ephemeral-rollups-sdk` | Exact existing `0.2.12` | No ER API migration. Its compatible Solana requirement resolves to `solana-program 2.3.0`. | | `solana-secp256k1-recover` | Attributed local fork of `2.2.1` | Only the host normal/dev `libsecp256k1` requirements change from `0.6.0` to the real upstream `0.7.2`. | The Rust compatibility edits use slice discriminators, replace three deprecated `realloc(size, false)` calls with `resize(size)`, and preserve the same legacy loader ID as a literal in a test. `resize` zeroes new bytes; all three migration paths already write the full appended range. Config is fully serialized, Enrollment writes its 18 appended bytes, and Challenge zeroes its tail. Account fields, sizes, order, seeds, authorization constraints, instruction arguments, program identity and financial terms are unchanged in source. Runtime and client ABI verification are recorded below. An isolated Anchor 1.2.1 / ER 0.17.3 resolution was also inspected. Its mandatory Solana compatibility path still retained `rand 0.7.3`, while introducing a larger API migration. It was not adopted or compiled. The selected change addresses the remaining host dependency directly. ## Original advisory ledger The earlier framework-only candidate still contained the `rand` finding. After the host dependency patch, all six affected versions are absent from the application lockfile. The final whole-graph scan reports zero known vulnerabilities; the two separate maintenance advisories below remain visible. | Original package | Advisory | Candidate resolution | | --- | --- | --- | | `serde_with 2.3.3` | [GHSA-7gcf-g7xr-8hxj](https://github.com/advisories/GHSA-7gcf-g7xr-8hxj) | Package absent. | | `rand 0.7.3` | [GHSA-cq8v-f236-94qc](https://github.com/advisories/GHSA-cq8v-f236-94qc) | Old branch removed; `rand 0.8.7` remains. | | `curve25519-dalek 3.2.1` | [GHSA-x4gp-pqpj-f43q](https://github.com/advisories/GHSA-x4gp-pqpj-f43q) | `4.1.3`. | | `ed25519-dalek 1.0.1` | [GHSA-w5vr-6qhr-36cc](https://github.com/advisories/GHSA-w5vr-6qhr-36cc) | Package absent. | | `atty 0.2.14` | [GHSA-g98v-hv3f-hcfr](https://github.com/advisories/GHSA-g98v-hv3f-hcfr) | Package absent. | | `borsh 0.9.3` | [GHSA-fjx5-qpf4-xjf2](https://github.com/advisories/GHSA-fjx5-qpf4-xjf2) | Old branch removed; `0.10.4` and `1.8.0` remain. | The last affected path was `rand 0.7.3 ← libsecp256k1 0.6.0 ← solana-secp256k1-recover 2.2.1 ← solana-program 2.3.0`, reached through ER 0.2.12 and SPL associated-token-account 7. The host-only target restriction did not exempt it from the all-dependencies audit requirement. ## Final Cargo audit and remaining maintenance work `cargo-audit 0.22.2` completed with exit 0 using `cargo audit --file anchor/Cargo.lock --deny unsound --deny yanked`. It scanned 272 dependencies against 1,295 RustSec records, database revision `550efd3d587a29b2e2c2b21b17a440da4fede999`, last updated `2026-10-08T16:47:14+02:00`. Its vulnerability count is zero and ignore list is empty. The full result is `cargo-audit.json` in the candidate evidence directory. CI pins the same checker and blocks vulnerabilities, unsoundness and yanked packages while retaining maintenance notices in its output. | Package | Remaining informational advisory | Maintenance requirement | | --- | --- | --- | | `bincode 1.3.3` | [RUSTSEC-2025-0141](https://rustsec.org/advisories/RUSTSEC-2025-0141.html): unmaintained | Review a wire-compatible upstream migration with the Solana dependency owners; changing serialization formats requires compatibility evidence. | | `libsecp256k1 0.7.2` | [RUSTSEC-2025-0161](https://rustsec.org/advisories/RUSTSEC-2025-0161.html): unmaintained | Review a maintained host recovery implementation through its upstream wrapper; repeat the recovery/error-compatibility tests before replacement. | Neither record lists a patched version. These notices are neither suppressed nor resolved by the zero vulnerability count. The result is **not zero Rust advisories**, a guarantee of security, or an independent financial audit. ## Local fork provenance The upstream wrapper is Apache-2.0, attributed to Anza Maintainers. Its published archive records commit `1c1d667f161666f12f5a43ebef8eda9470a8c6ee`, path `secp256k1-recover`. The fork retains the original version and source; it does not represent itself as a new upstream release. A leading manifest comment identifies the local modification. See [`UPSTREAM.md`](../anchor/vendor/solana-secp256k1-recover/UPSTREAM.md). Only two parsed manifest values differ: the non-Solana normal and dev `libsecp256k1` requirements. Their feature lists and default-feature settings are unchanged. The complete Rust source, on-chain syscall branch, `solana-define-syscall` dependency table, `Cargo.toml.orig` and VCS metadata are unchanged. `LICENSE` and `UPSTREAM.md` are added. | Evidence | SHA-256 | | --- | --- | | [Published wrapper 2.2.1 archive](https://static.crates.io/crates/solana-secp256k1-recover/solana-secp256k1-recover-2.2.1.crate) | `baa3120b6cdaa270f39444f5093a90a7b03d296d362878f7a6991d6de3bbe496` | | Original and local wrapper `src/lib.rs` | `54da9d67a371b6cb91cd22ccedd7a2389b09ad2486bd5409c1a3e509ff18e60b` | | Modified wrapper `Cargo.toml` | `480278db47aa5b23a5f12d6d6ac0d4237ad4a7872e78807129ab719f5e120f28` | | Published `libsecp256k1 0.6.0` archive | `c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73` | | Published `libsecp256k1 0.7.2` archive | `e79019718125edc905a079a70cfa5f3820bc76139fc91d6f9abc27ea2a887139` | | Original unused wrapper publication lockfile | `5818be465836558d3b02dc87aa64270a292c53511f654fc159db015b2820e941` | | Candidate application `Cargo.lock` | `23853b70d0dbd50aace9024af81b19f994a9482591fcd8902a912be5cfc479f7` | The unused publication lockfile is intentionally omitted from the vendor directory. Its exact original remains in the verified archive and external comparison evidence. The vulnerable baseline comparison workspace is also outside the release workspace. Neither is an application dependency or a nested application lockfile. Changes to this fork require source/provenance review and the same compatibility tests; remove it when an upstream compatible resolution passes these gates. ## Recovery compatibility evidence The independent harness at `/Users/rvaclassic/uplift-release/rust-secp-comparison-2026-10-09` calls the actual registry wrapper with `libsecp256k1 0.6.0` and the local path wrapper with `libsecp256k1 0.7.2`. Four tests passed with **3,686 paired calls and zero differences** in recovered public-key bytes or numeric error codes: - 1,280 comparisons from 128 deterministic signatures, their high-S variants, expected keys and recovery IDs 0–3. - 812 comparisons from 142 valid known-key Wycheproof vectors and 61 other parseable cases; both DER parsers also rejected the same 177 cases. - 570 malformed-input/error-precedence comparisons, including invalid lengths, recovery IDs 4–255, zero/order/overflowing scalars. - 1,024 deterministic arbitrary-input pairs: 254 recoveries and 770 errors. The unmodified upstream `tests/verify.rs::test_recover` also passed separately for both library versions, checking against its C-backed `secp256k1` test implementation. These tests establish compatibility for the exercised cases; they do not prove equivalence for every possible input or constitute a cryptographic audit. The external directory retains `src/lib.rs`, `Cargo.toml`, `Cargo.lock`, `comparison-test.log`, `upstream-0.6.0-recover.log`, `upstream-0.7.2-recover.log`, `source-identity.json`, `manifest.patch`, `dependency-tree.txt` and checksum-verified archives. From that directory: ```sh cargo test --locked -- --nocapture cargo test --manifest-path upstream/libsecp256k1-0.6.0/Cargo.toml --locked --test verify test_recover -- --exact --nocapture cargo test --manifest-path upstream/libsecp256k1-0.7.2/Cargo.toml --locked --test verify test_recover -- --exact --nocapture ``` ## Verification and review ledger Host toolchain: `rustc 1.93.1 (01f6ddf75 2026-02-11)` and `cargo 1.93.1 (083ac5135 2025-12-15)`. The selected production build uses Agave 4.2.1 (bundled cargo-build-sbf 4.1.0), platform-tools v1.54 and explicit SBPFv3. | Check | Status and evidence | | --- | --- | | Locked workspace check, strict all-target Clippy, formatting | Passed on the final candidate; `host-check.log`, `host-clippy.log`, worker command record. | | Rust host tests | 38 passed, 0 failed/ignored; `host-test.log`. | | Anchor IDL print generation | 3 passed, lint enabled; `idl-build.log`, `candidate-idl.raw.json`. The raw assembled output has 31 instructions, 4 account types, 45 errors and 8-byte discriminators. CLI normalization and the old TypeScript IDL suite are separate checks. | | Generated IDL versus current client | Passed: 30 instruction and 4 account discriminators, 45 error codes, 4 layouts and 72 decoder-field checks. All 64 invocations of 30 client builders match argument bytes, account order/addresses and flags after the three preexisting payer-flag fixes below. No original generated IDL exists for baseline equivalence. | | Source review | No critical/high regression reported in the compatibility edits; local fork approved by the independent implementation reviewer. This is agent/code review, not an external financial audit. | | Official Solana `program_autofixer` | `state.rs`: no findings. `lib.rs`: no critical/high findings; four existing medium arithmetic reports independently dismissed with bounds/guard evidence in `EXPERIMENT.md` and `autofixer-*.json`. No arithmetic changed. | | Recovery-library comparison | 3,686 pairs, no differences; both upstream recovery tests passed. | | Complete Cargo advisory scan | Exit 0; 0 known vulnerabilities, 2 unmaintained warnings, no ignores. See the database identity and maintenance ledger above. | | Production SBPFv3 build | Exit 0; 817,928 bytes; SHA-256 `b0cc3a5573236f7891ba705799b0aaa3e673fdab30051685b9bfaa27356fd6d2`. | | Exact-artifact runtime and actual Kamino CPI | 19 checks passed in LiteSVM 1.5.0 with upstream default features, using the hash-pinned SBPFv3 artifact and actual cloned Kamino ELF. `kamino-results.json` records zero mainnet transactions. | | Mainnet deployment/funding/lifecycle | Not performed; independent audit, designated funding/signers and real-money acceptance remain outstanding. | ### Retained source and platform-specific artifacts The release bundle identifies source commit [`ba839b36c662ba796cf30fa44d8651b0fff0a8c3`](https://github.com/operatoruplift/WEBSITE/commit/ba839b36c662ba796cf30fa44d8651b0fff0a8c3). Its `escrow-audit-candidate-ba839b3.tar.gz` archive is 3,470,446 bytes, SHA-256 `b52b7348a3f268de6c135799081e94754933bf0e67297da41b8bec0b5c0dfad6`. The evidence record is `/Users/rvaclassic/uplift-release/public-launch-2026-10-09/CONTRACT_RELEASE_EVIDENCE.json`. The archive and both retained ELF hashes were rechecked against their files on October 9; neither artifact is externally audited or deployed on mainnet. | Build environment | SBPFv3 artifact | Runtime evidence | | --- | --- | --- | | macOS, platform-tools v1.54 | 817,928 bytes; SHA-256 `b0cc3a5573236f7891ba705799b0aaa3e673fdab30051685b9bfaa27356fd6d2` | The 19 exact-artifact LiteSVM/Kamino checks described below. | | Linux CI, platform-tools v1.54 | 817,768 bytes; SHA-256 `84c4d8d2812ca3bae431edc008c32a8b1ee67aca156b6e4cb1de985e8eadaed6` | [CI run 37821565007](https://github.com/operatoruplift/WEBSITE/actions/runs/37821565007); 19 LiteSVM/Kamino checks, report timestamp `2026-10-08T18:09:08.656Z`. | The hashes differ across hosts. The release record reports different bundled standard-library paths in ELF strings; this observation does not prove that paths explain every binary difference or establish full semantic equivalence. Repeated builds on the recorded macOS host matched. Freeze one build environment and exact artifact for external audit and deployment; never substitute the other platform's hash. Both runtime reports use synthetic users, balances and proof records, with zero mainnet transactions sent. The same release record lists five local lifecycle harnesses and 138 checks. The initializer, stake/proof/refund, missed-commitment settlement and invariant phases use SBPFv3. The legacy stranded-principal release phase uses a separate SBPFv0 Bankrun build; those results do not establish execution of either production SBPFv3 artifact. Historical devnet observations likewise do not verify the current mainnet candidate. ### Client ABI and sponsored transaction correction The generated candidate IDL matches the current hand-written client and source mirror guards. Account sizes remain Config 206, Challenge 161, Enrollment 112 and KaminoPosition 169 bytes. The 31st generated instruction, `process_undelegation`, is the existing ER SDK macro callback; it does not require a public client builder. There is no original generated IDL available, so this does not claim baseline generated-IDL equivalence. The comparison exposed three preexisting client mistakes: `delegateEnrollmentIx`, `undelegateEnrollmentIx` and `migrateEnrollmentIx` marked the settlement-authority payer readonly despite the existing Rust mutable-payer constraint. They now mark it writable. A separate transaction fee sponsor previously exposed the mismatch because the authority no longer inherited the fee payer's write privilege. Three regression tests failed before the fix; all 13 MagicBlock router tests and strict targeted ESLint passed afterward. Account order and instruction bytes did not change. Evidence: `ABI_VERIFICATION_SUMMARY.json`, `ABI_BUILDER_REVIEW.json` and `ABI_CLIENT_CONSTANTS_AND_LAYOUTS.json` in the candidate directory. The raw IDL SHA-256 is `debc88e04a2ca1f0f99ad2ef668aa7016032620173345e254532a8d9e0217595`. Builder comparisons use selected argument/optional-account cases; runtime constraints still require execution tests. ### Exact-artifact Kamino evidence The run completed at `2026-10-08T17:54:38.966Z` (October 9 locally). It executed the selected 817,928-byte escrow artifact against the actual Kamino program in LiteSVM, with synthetic users, balances and proof records. The 19 checks cover migration, supply and slippage rollback, provider isolation, timing, partial/final redemption, duplicate rejection, illiquidity/retry, dust, simulated losses, isolated backstop coverage and principal/yield settlement. Mainnet access consisted only of finalized public reads. `kamino-snapshot/snapshot.json` and `kamino-results.json` record: | Snapshot field | Recorded value | | --- | --- | | Capture time | `2026-10-08T17:54:36.123Z` | | Reserve/state read slot | `454617380` | | Program read / deployed slot | `454617381` / `440486775` | | Kamino program | `KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD` | | Kamino ELF SHA-256 | `9db16dd4b7bbfe4f13df850bf880bfc4522fcece06717c0626d625746a3cc85b` | | Public accounts SHA-256 | `73becfb697868c63997e72238aea7b33ac74c79770d1c429e72782ac8d1b4180` | The reserve and program reads have separate finalized slots. Synthetic outage and loss cases are tests, not observations of mainnet provider performance. ### Reproduction From the repository root: ```sh cargo check --manifest-path anchor/Cargo.toml --workspace --locked cargo clippy --manifest-path anchor/Cargo.toml --workspace --all-targets --locked -- -D warnings cargo test --manifest-path anchor/Cargo.toml --workspace --locked cargo fmt --manifest-path anchor/Cargo.toml --all -- --check cargo audit --file anchor/Cargo.lock --deny unsound --deny yanked cargo-build-sbf --manifest-path anchor/programs/uplift-escrow/Cargo.toml --tools-version v1.54 --arch v3 -- --locked shasum -a 256 anchor/target/deploy/uplift_escrow.so ``` For the IDL print checks, use the intended source path and keep lint enabled: ```sh ANCHOR_IDL_BUILD_PROGRAM_PATH="$PWD/anchor/programs/uplift-escrow" \ ANCHOR_IDL_BUILD_NO_DOCS=FALSE \ ANCHOR_IDL_BUILD_RESOLUTION=TRUE \ ANCHOR_IDL_BUILD_SKIP_LINT=FALSE \ cargo test --manifest-path anchor/Cargo.toml --locked \ __anchor_private_print_idl --features idl-build -- --show-output --quiet ``` Use `cargo-audit 0.22.2`, the version pinned in CI. For replay of the retained release artifact and public snapshot from the repository root: ```sh RUST_EVIDENCE=/Users/rvaclassic/uplift-release/rust-migration-2026-10-09 node scripts/verify-kamino-local.mjs --runtime litesvm \ --artifact "$RUST_EVIDENCE/sbpf/uplift_escrow.so" \ --sha256 b0cc3a5573236f7891ba705799b0aaa3e673fdab30051685b9bfaa27356fd6d2 \ --snapshot "$RUST_EVIDENCE/kamino-snapshot" \ --report "$RUST_EVIDENCE/kamino-replay-results.json" ``` See [production testing](SOLANA_PRODUCTION_TESTING.md) for snapshot capture and new-artifact verification. Preserve the full command output, audit database revision, source commit, Cargo lock hash, artifact hash/size, runtime version and snapshot hash together. A report from different bytes does not close the final candidate's gate. The public PWA and practice-only Seeker package have their own [owner release steps](../mobile/store/PUBLIC_RELEASE_STEPS_2026-10-08.md). Mainnet requirements remain in [MAINNET.md](../anchor/MAINNET.md) and [MAINNET_READINESS.md](../MAINNET_READINESS.md). Dependency cleanup does not enable deposits, stakes or yield.