-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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/ssh: data race in diffie-hellman-group-exchange-sha256 #37607
Comments
A "simple" fix I could think of is to remove these two lines in diffie-hellman-group-exchange-sha256 and replace the usage of For completeness sake we could adopt the changes mentioned above for the @FiloSottile, @hanwen: What do you think? Should I provide a PR with these changes or do you have a different solution in mind? |
I looked a little bit more into this issue and how to fix it. This is what I have found out so far:
|
Change https://golang.org/cl/222078 mentions this issue: |
any update on this? @breml i tried your fix, still seeing handshake failures. A few connections go through initially, the remaining hangs and times out of handshake failure. Although, no data race is observed.
|
@KarthikNath I am not sure what you mean. There is an open CL (https://go-review.googlesource.com/c/crypto/+/222078/), which waits to get merged and then released. There is currently nothing I can do about this. Which fix did you try? |
I updated my library with your changes in the PR to see if its working. Im running into same issue as before. Wondering if thats not enough to get the library working? |
Just an update. Key exchange still doesn't work on a huge set of hosts ran concurrently. Although data race is no longer observed. |
Fixes golang/go#37607 Change-Id: Iedf6522ec9b9a676ac51c054407a6aef894885f5 GitHub-Last-Rev: 8cb2460c59d2e32bc3f0480bcd7867a113361c67 GitHub-Pull-Request: golang/crypto#126 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/222078 Reviewed-by: Han-Wen Nienhuys <[email protected]> Run-TryBot: Han-Wen Nienhuys <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Fixes golang/go#37607 Change-Id: Iedf6522ec9b9a676ac51c054407a6aef894885f5 GitHub-Last-Rev: 8cb2460c59d2e32bc3f0480bcd7867a113361c67 GitHub-Pull-Request: golang/crypto#126 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/222078 Reviewed-by: Han-Wen Nienhuys <[email protected]> Run-TryBot: Han-Wen Nienhuys <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Fixes golang/go#37607 Change-Id: Iedf6522ec9b9a676ac51c054407a6aef894885f5 GitHub-Last-Rev: 8cb2460c59d2e32bc3f0480bcd7867a113361c67 GitHub-Pull-Request: golang/crypto#126 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/222078 Reviewed-by: Han-Wen Nienhuys <[email protected]> Run-TryBot: Han-Wen Nienhuys <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Fixes golang/go#37607 Change-Id: Iedf6522ec9b9a676ac51c054407a6aef894885f5 GitHub-Last-Rev: 8cb2460c59d2e32bc3f0480bcd7867a113361c67 GitHub-Pull-Request: golang/crypto#126 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/222078 Reviewed-by: Han-Wen Nienhuys <[email protected]> Run-TryBot: Han-Wen Nienhuys <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Fixes golang/go#37607 Change-Id: Iedf6522ec9b9a676ac51c054407a6aef894885f5 GitHub-Last-Rev: 8cb2460 GitHub-Pull-Request: golang#126 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/222078 Reviewed-by: Han-Wen Nienhuys <[email protected]> Run-TryBot: Han-Wen Nienhuys <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Fixes golang/go#37607 Change-Id: Iedf6522ec9b9a676ac51c054407a6aef894885f5 GitHub-Last-Rev: 8cb2460c59d2e32bc3f0480bcd7867a113361c67 GitHub-Pull-Request: golang/crypto#126 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/222078 Reviewed-by: Han-Wen Nienhuys <[email protected]> Run-TryBot: Han-Wen Nienhuys <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
@FiloSottile @breml Opening issue in reference to #17230 (comment)
Running into failures on concurrent ssh with diffiehelman group exchange. Random hosts are failing always. Seems more like its running into race condition with diffiehelman addition. Works perfectly with default kex's. Below is concurrency code snippet
Below is the race condition errors i see.
The text was updated successfully, but these errors were encountered: