Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix authentication failure handling in decryption path of Go implementations #4

Merged
merged 1 commit into from
Aug 19, 2023

Conversation

iokill
Copy link
Contributor

@iokill iokill commented Jun 14, 2022

Hi!

I noticed an issue in the Go implementation of decryptWithAd(): Whenever decrypt() reports an authentication failure, the nonce in CipherState is still incremented unconditionally. Doing so will result in all subsequent packets being rejected as their nonces will not match anymore. This might also be abused for DoS attacks.

A similar issue has been reported and fixed in flynn/noise: GHSA-g9mp-8g3h-3c5c

Whenever decrypt() reports an authentication failure, don't
increment the nonce in CipherState. Doing so will result in all
subsequent packets being rejected as their nonces will not match
anymore. This might also be abused for DoS attacks.
@nadimkobeissi nadimkobeissi merged commit fa98a6d into symbolicsoft:master Aug 19, 2023
@nadimkobeissi
Copy link
Member

Thank you @iokill !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants