Incorrect hash in sha2
Critical severity
GitHub Reviewed
Published
Jan 6, 2022
to the GitHub Advisory Database
•
Updated Aug 17, 2023
Description
Published by the National Vulnerability Database
Dec 27, 2021
Reviewed
Jan 6, 2022
Published to the GitHub Advisory Database
Jan 6, 2022
Last updated
Aug 17, 2023
The v0.9.7 release of the sha2 crate introduced a new AVX2-accelerated backend which was automatically enabled for all x86/x86_64 CPUs where AVX2 support was autodetected at runtime.
This backend was buggy and would miscompute results for long messages (i.e. messages spanning multiple SHA blocks).
The crate has since been yanked, but any users who upgraded to v0.9.7 should immediately upgrade to v0.9.8 and recompute any hashes which were previously computed by v0.9.7.
References