Home/Research/Post

GHSA-25rm-9wvm-m38v: falcon-rust: Discrete-Gaussian sampler runs at 2^-33 precision, far below Falcon’s requirement (reference KAT vectors no longer pass)

  • Severity: MEDIUM
  • CVE: CVE-2026-77382
  • Ecosystems: rust
  • Packages: falcon-rust

**Reporter:** Connor Webber
**Package:** `falcon-rust` (crates.io), repository `github.com/aszepieniec/falcon-rust`
**Affected:** v0.1.3 and the current `master` (HEAD `cfa1b35`). Regression introduced in commit `bf2cf00`.
**Component:** discrete-Gaussian sampler, `src/samplerz.rs` (`approx_exp`, `ber_exp`, `sampler_z`)
**Status:** Confirmed by source review and by empirical measurement of the crate’s own compiled code.

## Summary

falcon-rust’s discrete-Gaussian rejection sampler evaluates its `exp()` acceptance step at only 32 bits of fractional precision. Measured directly against the crate’s own compiled code, `approx_exp` has a maximum relative error of 2^-33. For comparison, the Falcon reference implementation achieves about 2^-63, and the f64 code this crate replaced achieved about 2^-52. The current sampler is therefore roughly 2^19 (about 500,000x) less precise than the version it replaced, and about 2^30 less precise than the reference.

Falcon’s security proof relies on the sampled signatures being statistically indistinguishable from an ideal discrete Gaussian, so the signature transcript leaks nothing about the secret trapdoor. That guarantee holds only when the sampler’s relative error stays small enough, over the roughly 2^64 signature budget, to keep the Renyi divergence between the real and ideal distributions negligible. The precision the security analysis relies on is cited in the literature between roughly 2^-40 and 2^-46 (for example the FACCT and isochr…

Source: GitHub Security Advisories · 2026-11-20