Advisory

GO-2022-0425

Also known as: CVE-2021-4239, GHSA-6cr6-fmvc-vw2p, GHSA-g9mp-8g3h-3c5c

Summary

Weak encryption and denial of service in github.com/flynn/noise

Details

The Noise protocol implementation suffers from weakened cryptographic security after encrypting 2^64 messages, and a potential denial of service attack.

After 2^64 (~18.4 quintillion) messages are encrypted with the Encrypt function, the nonce counter will wrap around, causing multiple messages to be encrypted with the same key and nonce.

In a separate issue, the Decrypt function increments the nonce state even when it fails to decrypt a message. If an attacker can provide an invalid input to the Decrypt function, this will cause the nonce state to desynchronize between the peers, resulting in a failure to encrypt all subsequent messages.

Severity

Not rated by the source.

Dates

Published
2022-02-15 01:57 UTC
Modified
2024-05-20 16:03 UTC

Affected packages and fixes

github.com/flynn/noise

Go · All systems

Affected

  • introduced 0, fixed 1.0.0 (semver)

Fixed versions

1.0.0

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: Go Vulnerability Database · CC BY 4.0

Sources & licences