Advisory

GHSA-r5c5-pr8j-pfp7

Also known as: CVE-2019-11840, GO-2022-0209

Summary

golang.org/x/crypto/salsa20/salsa uses insufficiently random values

Details

An issue was discovered in supplementary Go cryptography libraries, aka golang-googlecode-go-crypto, before 2019-03-20. A flaw was found in the amd64 implementation of golang.org/x/crypto/salsa20 and golang.org/x/crypto/salsa20/salsa. 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.

Specific Go Packages Affected
golang.org/x/crypto/salsa20/salsa

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2022-05-24 16:45 UTC
Modified
2026-09-10 03:49 UTC

Affected packages and fixes

golang.org/x/crypto

Go · All systems

Affected

  • introduced 0, fixed 0.0.0-20190320223903-b7391e95e576 (semver)

Fixed versions

0.0.0-20190320223903-b7391e95e576

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences