HistoryEditJSON (OSV)

RUSTSEC-2021-0100

Miscomputed results when using AVX2 backend

Reported
Issued
Package
sha2 (crates.io)
Type
Vulnerability
Categories
Keywords
#cryptography
Aliases
References
Patched
  • >=0.9.8
Unaffected
  • <0.9.7

Description

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.

Advisory available under CC0-1.0 license.