Skip to content

Miscomputed sha2 results when using AVX2 backend

High severity GitHub Reviewed Published Jun 17, 2022 to the GitHub Advisory Database • Updated Jan 12, 2023

Package

cargo sha2 (Rust)

Affected versions

= 0.9.7

Patched versions

0.9.8

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.

References

Published to the GitHub Advisory Database Jun 17, 2022
Reviewed Jun 17, 2022
Last updated Jan 12, 2023

Severity

High

Weaknesses

No CWEs

CVE ID

No known CVE

GHSA ID

GHSA-xpww-g9jx-hp8r

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.