Security context

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

dagenix/rust-crypto
master @ cc1a5fd
2
Fixes
0
CVEs
CRITICAL
Peak severity
50.0%
Coverage
Highlights
Cryptographic Issues: 1 prior fix. Scrutinize any change in this area.
src/bcrypt.rs: most-fixed (1 issue). Treat as high-risk during review.
2 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.

Memory Corruption: Reversed source and destination arguments in raw memory copy operations (ptr::copy_nonoverlapping) lead to severe memory corruption and potential exposure of sensitive cryptographic keys. Developers must verify that unsafe pointer copying operations strictly match expected source and destination orderings.
Cryptographic Issues: An unconstrained cost factor allowed an integer overflow during bit shifting, resulting in zero key expansion iterations and rendering the bcrypt hashing insecure. Ensuring rigorous parameter bounds assertions before cryptographic calculations is essential to maintain security guarantees.