PT-2024-40264 · Gnark · Gnark
Published
2024-10-29
·
Updated
2024-10-29
CVSS v4.0
6.9
Medium
| Vector | AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N |
Name of the Vulnerable Software and Affected Versions:
Gnark versions prior to 1.2.0
Description:
The issue concerns the Gnark recursion circuit, which has constraints on arithmetic over BabyBear when the native field of the ZKP circuit is the BN254 scalar field. The problem arises from improper range checking of Bn254 values, which should be less than the BabyBear modulus. In affected versions, functions like
InvF and InvE used unrange-checked values generated by hints. This was resolved by adding range checks in versions 1.2.0 and higher. The issue was discovered by the Succinct team and was fixed and released within 48 hours.Recommendations:
For versions prior to 1.2.0, update to version 1.2.0 or higher to resolve the issue. As a temporary workaround, consider adding manual range checks for Bn254 values to ensure they are less than the BabyBear modulus until a patch is applied. Restrict the use of functions like
InvF and InvE that rely on unrange-checked hint values to minimize the risk of exploitation.Fix
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Gnark