Skip to content
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

ssh -rs crashed on Zero lenght version information #85

Closed
Paulo-21 opened this issue Nov 13, 2023 · 4 comments
Closed

ssh -rs crashed on Zero lenght version information #85

Paulo-21 opened this issue Nov 13, 2023 · 4 comments

Comments

@Paulo-21
Copy link

Hello,
I encountered an error when running ssh -rs in several threads.
I'm trying to connect to a real ssh server, which may be behind a firewall or a specific security system.

panic

@HsuJv
Copy link
Collaborator

HsuJv commented Nov 14, 2023

Hi

Could you help use python or any other script to create a TCP connection to your ssh server ip:port, and call read on this connection once connected?

Looks like the server doesn't respond their ssh version to us, the protocol version exchange (https://www.rfc-editor.org/rfc/rfc4253#section-4.2) fails and panic with some careless code

BRs.

@Paulo-21
Copy link
Author

I can add that there is "portsentry -atcp" activated on the server and the openssh version is 7.6p1.
It would be difficult to do that because i have a limited access to it.
Can it be possible to return an error like "Inapropriate_ssh_response_from_server" rather than panic ?

@HsuJv
Copy link
Collaborator

HsuJv commented Nov 14, 2023

Yes, you're right, it shall throw errors instead of panic.

Since you mentioned portsentry is running. I guess it might require us to send out the version negotiation first.
I'll also make some changes to see if this can fix the issue.

Could you please use ssh-rs = { git = "https://github.com/HsuJv/ssh-rs.git", branch = "patch_85" } to help verify this issue?

BRs

@Paulo-21
Copy link
Author

Paulo-21 commented Nov 14, 2023

Hey,
I have tested and it work properly.
Thank you for your responsiveness and your kindness as always ;)

@HsuJv HsuJv mentioned this issue Nov 15, 2023
HsuJv added a commit that referenced this issue Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants