Vulnerability Report: GO-2022-0209
- CVE-2019-11840, GHSA-r5c5-pr8j-pfp7
- Affects: golang.org/x/crypto
- Published: Jul 01, 2022
- Modified: May 20, 2024
XORKeyStream generates incorrect and insecure output for very large inputs. 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. Architectures other than amd64 and uses that generate less than 256 GiB of keystream for a single salsa20.XORKeyStream invocation are unaffected.
Affected Packages
-
PathGo VersionsSymbols
-
before v0.0.0-20190320223903-b7391e95e576
Aliases
References
- https://go.dev/cl/168406
- https://go.googlesource.com/crypto/+/b7391e95e576cacdcdd422573063bc057239113d
- https://go.dev/issue/30965
- https://groups.google.com/g/golang-announce/c/tjyNcJxb2vQ/m/n0NRBziSCAAJ
- https://vuln.go.dev/ID/GO-2022-0209.json
Credits
- Michael McLoughlin
Feedback
See anything missing or incorrect?
Suggest an edit to this report.