-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
x/crypto/openpgp: infinite loop on unknown cipher type / key #28786
Labels
Milestone
Comments
Change https://golang.org/cl/149677 mentions this issue: |
FiloSottile
changed the title
x/crypto: infinite loop on unknown cipher type / key
x/crypto/openpgp: infinite loop on unknown cipher type / key
Feb 9, 2019
For me solution was to modify prompt function to return key only once, and when called second time return error. This approach is inspired by openpgp's test suite: https://github.com/golang/crypto/blob/master/openpgp/read_test.go#L258 |
This was referenced Jul 7, 2020
uwehdaub
pushed a commit
to uwehdaub/sops
that referenced
this issue
Jul 8, 2020
This fixes getsops#665 See also golang/go#28786 In some strange situations it can happen, that openpgp.ReadMessage() runs into a endless loop. This seems to be triggered by a slightly inconsistency in key settings. It happened to me, but I wasn't able to reproduce it with a fresh key. A proposed solution from the x/crypto community was, to break this loop in the callback passphrasePrompt.
autrilla
pushed a commit
to getsops/sops
that referenced
this issue
Jul 14, 2020
* Fix tests * Fix endless loop in x/crypto/openpgp func ReadMessage This fixes #665 See also golang/go#28786 In some strange situations it can happen, that openpgp.ReadMessage() runs into a endless loop. This seems to be triggered by a slightly inconsistency in key settings. It happened to me, but I wasn't able to reproduce it with a fresh key. A proposed solution from the x/crypto community was, to break this loop in the callback passphrasePrompt. * Revert "Fix tests" This reverts commit 285f4dc. * Improve error description #690 (comment)
clelange
pushed a commit
to clelange/sops
that referenced
this issue
Jul 19, 2020
* Fix tests * Fix endless loop in x/crypto/openpgp func ReadMessage This fixes getsops#665 See also golang/go#28786 In some strange situations it can happen, that openpgp.ReadMessage() runs into a endless loop. This seems to be triggered by a slightly inconsistency in key settings. It happened to me, but I wasn't able to reproduce it with a fresh key. A proposed solution from the x/crypto community was, to break this loop in the callback passphrasePrompt. * Revert "Fix tests" This reverts commit 285f4dc. * Improve error description getsops#690 (comment)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
A simple test case to illustrate the problem:
What did you expect to see?
An error should be returned from
ReadMessage
What did you see instead?
An infinite loop.
The text was updated successfully, but these errors were encountered: