ssh: return unexpected msg error when server fails keyboard-interactive auth early by samiponkanen · Pull Request #297 · golang/crypto (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation48 Commits1 Checks1 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Seems the OpenSSH server running on windows fails keyboard-interactive
auth this way without sending any prompt to client. In such case the
golang ssh client should not retry keyboard-interactive auth when the
auth method is wrapped in a RetryableAuthMethod(). Rather the auth
method should be immediately marked as tried&failed and the client auth
process should move on to next available and acceptable auth method.
Fixes golang/go#67855
This PR (HEAD: 4df2f67) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
This PR (HEAD: 95b457c) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
samiponkanen changed the title
ssh: fail keyboard-interactive auth with unexpectedMessageError() when auth fails before receiving the UserAuthInfoRequest from server crypto/ssh: crypto/ssh: return unexpected msg error when server fails keyboard-interactive auth early
This PR (HEAD: 732afad) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
samiponkanen changed the title
crypto/ssh: crypto/ssh: return unexpected msg error when server fails keyboard-interactive auth early crypto/ssh: return unexpected msg error when server fails keyboard-interactive auth early
This PR (HEAD: b5cef16) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
This PR (HEAD: 28c1119) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
This PR (HEAD: 3197aea) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
This PR (HEAD: b0e0ee1) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from Ian Lance Taylor:
Patch Set 8: Commit-Queue+1
Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!
Message from Go LUCI:
Patch Set 8:
Dry run: CV is trying the patch.
Bot data: {"action":"start","triggered_at":"2024-09-29T04:44:17Z","revision":"05fa40fa25835defdf17389e58de831828ad5d97"}
Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!
This PR (HEAD: f2a8ba2) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
This PR (HEAD: 4f1243e) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from Go LUCI:
Patch Set 13:
Dry run: CV is trying the patch.
Bot data: {"action":"start","triggered_at":"2024-09-29T14:08:10Z","revision":"abbd9b1b5bb33fde96cf620bbb60bb40349ed5aa"}
Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!
Message from Go LUCI:
Patch Set 13:
This CL has passed the run
Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!
This PR (HEAD: e902116) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
samiponkanen changed the title
crypto/ssh: return unexpected msg error when server fails keyboard-interactive auth early ssh: return unexpected msg error when server fails keyboard-interactive auth early
This PR (HEAD: 7fafc4d) has been imported to Gerrit for code review.
Please visit Gerrit at https://go-review.googlesource.com/c/crypto/+/590956.
Important tips:
- Don't comment on this PR. All discussion takes place in Gerrit.
- You need a Gmail or other Google account to log in to Gerrit.
- To change your code in response to feedback:
- Push a new commit to the branch used by your GitHub PR.
- A new "patch set" will then appear in Gerrit.
- Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
- Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
- Multiple commits in the PR will be squashed by GerritBot.
- The title and description of the GitHub PR are used to construct the final commit message.
- Edit these as needed via the GitHub web interface (not via Gerrit or git).
- You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
- See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
Message from Go LUCI:
Patch Set 15:
Dry run: CV is trying the patch.
Bot data: {"action":"start","triggered_at":"2024-10-15T13:20:26Z","revision":"7caa73b438116475ede4ee66f6813f8b61bb8d37"}
Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!
Message from Go LUCI:
Patch Set 15:
This CL has passed the run
Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!
Message from Dmitri Shuralyov:
Patch Set 15: Code-Review+1
Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!
Message from Ian Lance Taylor:
Patch Set 16: Code-Review+1
Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!
Message from Ian Lance Taylor:
Patch Set 16: Commit-Queue+1
Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!
Message from Go LUCI:
Patch Set 16:
Dry run: CV is trying the patch.
Bot data: {"action":"start","triggered_at":"2024-10-16T02:36:47Z","revision":"5f5cfd4ef501d97b3bfca21afe6a7ec7f4fecb53"}
Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!
Message from Ian Lance Taylor:
Patch Set 16: -Commit-Queue
Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!
Message from Go LUCI:
Patch Set 16:
This CL has passed the run
Please don’t reply on this GitHub thread. Visit golang.org/cl/590956.
After addressing review feedback, remember to publish your drafts!
gopherbot pushed a commit that referenced this pull request
…ve auth early
Seems the OpenSSH server running on windows fails keyboard-interactive auth this way without sending any prompt to client. In such case the golang ssh client should not retry keyboard-interactive auth when the auth method is wrapped in a RetryableAuthMethod(). Rather the auth method should be immediately marked as tried&failed and the client auth process should move on to next available and acceptable auth method.
Fixes golang/go#67855
Change-Id: I6c64ae58ff8325774e37af716601b112f8833d8f GitHub-Last-Rev: 7fafc4d GitHub-Pull-Request: #297 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/590956 LUCI-TryBot-Result: Go LUCI golang-scoped@luci-project-accounts.iam.gserviceaccount.com Reviewed-by: Dmitri Shuralyov dmitshur@google.com Reviewed-by: Ian Lance Taylor iant@google.com Auto-Submit: Nicola Murino nicola.murino@gmail.com Reviewed-by: Nicola Murino nicola.murino@gmail.com
2 participants