PT-2019-12523 · Go · Golang.Org/X/Crypto
Michael Mcloughlin
·
Published
2019-05-09
·
Updated
2026-05-18
·
CVE-2019-11840
CVSS v3.1
5.9
Medium
| Vector | AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
Name of the Vulnerable Software and Affected Versions
golang.org/x/crypto versions before v0.0.0-20190320223903-b7391e95e576
Description
A flaw was found in the amd64 implementation of the golang.org/x/crypto/salsa20 and golang.org/x/crypto/salsa20/salsa packages. If more than 256 GiB of keystream is generated, or if the counter otherwise grows greater than 32 bits, the amd64 implementation will first generate incorrect output, and then cycle back to previously generated keystream. Repeated keystream bytes can lead to loss of confidentiality in encryption applications, or to predictability in CSPRNG applications. The issue might affect uses of golang.org/x/crypto/nacl with extremely large messages.
Recommendations
For versions before v0.0.0-20190320223903-b7391e95e576, update to a version after v0.0.0-20190320223903-b7391e95e576 to resolve the issue. As a temporary workaround, consider limiting the keystream generation to less than 256 GiB for a single salsa20.XORKeyStream invocation to minimize the risk of exploitation. Restrict the use of the vulnerable golang.org/x/crypto/salsa20 and golang.org/x/crypto/salsa20/salsa packages in amd64 implementations until a patch is available.
Fix
Use of Insufficiently Random Values
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Golang.Org/X/Crypto