Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

mit-plv/fiat-crypto
master @ 5691ca0
3
Fixes
0
CVEs
HIGH
Peak severity
100.0%
Coverage
Highlights
Integer Overflow: 3 prior fixes. Scrutinize any change in this area.
ModularBaseSystemOpt.v: most-fixed (2 issues). Treat as high-risk during review.
3 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Integer Overflow: Right shifts of signed values in generated C code invoke undefined behavior, which can produce incorrect cryptographic results. The fix casts to a wider signed integer before shifting, but sibling generated files or future regenerations may miss this pattern.
Integer Overflow: Unsigned underflow in subtraction (BaseSystem.sub (add xs us) vs) causes incorrect modular arithmetic. The fix adds 2*q before subtracting to avoid underflow, but the same pattern may appear in other subtraction paths or in the generated C.