Runtime-benchmarks feature compiles out signature-share verification in exodus

Hi team

Finding, filed as a hardening note and not a live exploit: with the runtime-benchmarks feature enabled, register_signature_share compiles out the invalid share rejection and the aggregate-signature rejection, so invalid shares would be accepted without verification.

Location. exodus lib dot rs lines 1735 to 1738: the early return rejecting an invalid share carries cfg not feature runtime-benchmarks. Lines 1799 to 1802: the aggregate-signature rejection carries the same cfg shape. With the feature on, both checks are compiled out. Wiring: runtime casper Cargo dot toml line 227 wires ghost-exodus runtime-benchmarks into the runtime benchmark feature, and the pallet Cargo dot toml lines 90 to 95 define the feature. The RNG leg that once sat beside this (deterministic ChaCha20 seed from authority index) is fixed on origin pallet-exodus commit 6b00334 and is excluded from this filing; the verification bypass lines remain on that branch.

Deployment check, stated honestly. Ripgrep across the repo found exactly one non-Cargo hit: scripts run-all-benches dot sh lines 51 and 52, which builds a local release node with the feature for weight benchmarking only. The release script builds no binary at all, it only merges branches and tags. No Dockerfile, no workflow directory and no packaging script sets the feature for a shipped binary. The workspace Cargo dot toml line 391 carries it as an opt-in flag. No build artifact, binary metadata or release pipeline evidence shows any shipped binary carrying the feature. Code behavior at HEAD is confirmed; live exposure is unproven, which is why this files as hardening and not as an exploited defect.

Suggested fix: gate the compiled-out checks behind a dedicated test-only cfg rather than the shared benchmarks feature, or keep the verification unconditional in every build profile.

Shahmeer

Thank you for your report!

You’re absolutely right here. Occasionally it’s not an easy task to mock the signing process, especially given the number of possible validators - we’re heavily dependent on the FROST signing process, which is pretty strict. So we have to run real signing rounds for every possible validator, which can be pretty intensive and time-consuming, even though signing isn’t really what we’re trying to benchmark.

That’s why we landed on this dirty trick of short-circuiting the execution during benchmarks. Do you see any possible abuses of it? My thinking is that different runtimes would reject each other during p2p interaction - or am I missing something here?

Hi team

Your p2p reasoning holds for the network case: a benchmark binary that accepts an invalid share ends up with divergent state, and honest peers reject what it sends, so it mostly harms itself. The residual risk is operational rather than consensus: anyone who runs the benchmark profile outside benchmarking, for performance or by build mistake, silently loses signature-share verification with no warning at runtime. Gating the compiled-out checks behind a dedicated test-only cfg keeps the benchmark speed without letting the flag travel into any shipped profile.

Shahmeer

What would be a better solution in your opinion here:

  1. Add an additional unsafe-skip-signature-verification feature for that purpose.
  2. Inject a warning message about the lack of signature verification during compilation.
  3. Both of the above.
  4. Other.