-
Notifications
You must be signed in to change notification settings - Fork 602
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
[email protected] unhandled #237
Comments
And here is the mentioned NPE-variant:
|
Work-arround: pick a client with SSH_BUG_HOSTKEYS in OpenSSH's compat.c and set it as Version on your Config:
|
Can you send a debug log for both scenarios with the following levels:
|
If I left out important stuff, just ask. I'm not sure what is important and what just would give details about my application unreleted to this problem. NPE-case:
SSHException: Unexpected: SSH_MSG_UNIMPLEMENTED-Case:
|
I would presume that you don't expect the server to send a message on it's own directly after the authentication is done and then it matters how far the process in net.schmizz.sshj.userauth.UserAuthImpl#authenticate runs before the transport-thread receives the message.
More common case seems to be the NPE as usually the locks prevent the transport-layer from passing the message unto |
Hi @TheConstructor, Yes, I was looking at the same piece of code, it seems like a nasty race condition, not the first one I've solved today ;). Thanks for attaching the logs. |
Hi @TheConstructor, I think I've fixed this, could you see whether you can still reproduce this with a latest snapshot. I have unfortunately not had time yet to setup a testing box myself. |
Ok, checked and verified with an Debian Stretch VM with OpenSSH 7.2p2. The fix fixes the race condition. Thanks for reporting this! |
Thanks for fixing! Any idea when 0.16.0 will be released? |
According to this mail-thread clients may receive "[email protected]" after authentication. While OpenSSH-6.9-Release-Notes already list issues with Terra Term, it seems your software is also affected.
If net.schmizz.sshj.userauth.UserAuthImpl#handle is called post-auth with a GLOBAL_REQUEST like [email protected] it will simply throw a NullPointerException, if the message is received before
currentMethod
is set to null you get the following stack-trace:I am connecting against a OpenSSH_7.1p2-hpn14v10, OpenSSL 1.0.2f 28 Jan 2016 server on a raspberry pi. Distribution is Gentoo.
Strangely this error only occurs once every 5-10 connections. I used the debugger to verify it actually is a
[email protected]
-message.The text was updated successfully, but these errors were encountered: