Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. sp1-recursion-gnark-ffi
  4. ›
  5. GHSA-f77q-r5qm-w4m8

GHSA-f77q-r5qm-w4m8: sp1-recursion-gnark-ffi has insufficient range checks of BabyBear arithmetic

October 29, 2024

The Gnark recursion circuit constrains arithmetic over BabyBear when the native field of the ZKP circuit is the BN254 scalar field. Proper implementation of this logic requires range checking Bn254 values to be less than the BabyBear modulus.

In versions < 1.2.0, functions like InvF and InvE used values generated by hints that were not appropriately range checked. These issues are resolved in versions 1.2.0 and higher, by adding range checks in the appropriate places. This code was covered under the original audit scope of the recursion circuit audit by Veridise, and both Veridise and Kalos revisited the code for similar issues and found no additional vulnerabilities.

This issue was discovered by the Succinct team on September 3rd. The issue was fixed and resolved within 48 hours, and released with V1.2.0 (note that a later V2.0.0 release has the same contents as V1.2.0 to respect semver), with production SP1 users being notified and upgraded immediately. The V1.1.0 verifier was frozen on September 4th to ensure that no one uses versions of SP1 with this bug.

References

  • github.com/advisories/GHSA-f77q-r5qm-w4m8
  • github.com/succinctlabs/sp1
  • github.com/succinctlabs/sp1/commit/8600d4aa63184ce3df7ccd30c79ac0388eacca52
  • github.com/succinctlabs/sp1/security/advisories/GHSA-f77q-r5qm-w4m8

Code Behaviors & Features

Detect and mitigate GHSA-f77q-r5qm-w4m8 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.2.0

Fixed versions

  • 1.2.0

Solution

Upgrade to version 1.2.0 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Learn more about CVSS

Source file

cargo/sp1-recursion-gnark-ffi/GHSA-f77q-r5qm-w4m8.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:48 +0000.