Userauth none bypasses wolfSSHd credential check#940
Merged
padelsbach merged 1 commit intowolfSSL:masterfrom Apr 21, 2026
Merged
Userauth none bypasses wolfSSHd credential check#940padelsbach merged 1 commit intowolfSSL:masterfrom
padelsbach merged 1 commit intowolfSSL:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Fixes an authentication bypass in wolfSSHd when built with WOLFSSH_ALLOW_USERAUTH_NONE by preventing USERAUTH_NONE from being treated as an acceptable auth method in the server’s default auth handler.
Changes:
- Reject
WOLFSSH_USERAUTH_NONEinDefaultUserAuth()by removing it from the accepted auth-type allowlist. - Clarify behavior via a comment noting
WOLFSSH_USERAUTH_NONEis not valid for wolfSSHd.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7963acc to
2cbef50
Compare
When wolfsshd is built with WOLFSSH_ALLOW_USERAUTH_NONE, the DefaultUserAuth() function accepted WOLFSSH_USERAUTH_NONE as a valid auth type and forwarded it to RequestAuthentication(). Since RequestAuthentication() only gates credential checks on PASSWORD and PUBLICKEY types, a none request for any existing system user returned success without verifying any credential. Removed USERAUTH_NONE as an accepted auth type in DefaultUserAuth() so it is treated as an invalid auth type for wolfsshd. Affected function: DefaultUserAuth. Issue: F-3215
2cbef50 to
290aae2
Compare
padelsbach
approved these changes
Apr 20, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When wolfsshd is built with WOLFSSH_ALLOW_USERAUTH_NONE, the DefaultUserAuth() function accepted WOLFSSH_USERAUTH_NONE as a valid auth type and forwarded it to RequestAuthentication(). Since RequestAuthentication() only gates credential checks on PASSWORD and PUBLICKEY types, a none request for any existing system user returned success without verifying any credential. Removed USERAUTH_NONE as an accepted auth type in DefaultUserAuth() so it is treated as an invalid auth type for wolfsshd.
I want to emphasize, you have to build with the flag WOLFSSH_ALLOW_USERAUTH_NONE for this to be a problem.
Affected function: DefaultUserAuth.
Issue: F-3215