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

Disconnect when SSH server sends data with zero payload #32

Open
GoogleCodeExporter opened this issue Dec 8, 2015 · 3 comments
Open

Comments

@GoogleCodeExporter
Copy link

When SSH server sends data with zero payload - SSH_MSG_CHANNEL_DATA message 
with length 9 the Ganymed client throws an exception and disconnects

A data message with zero payload should be handled and silently discarded. 
Instead, the msgChannelData function will throw an IOException 
"SSH_MSG_CHANNEL_DATA message has wrong size ("  9  ")". The client then 
disconnects

SSH-2.0-Ganymed_261
OS X 10.9.1

The Ganymed client check the length of SSH data message when it is received. 
When the SSH server send a data packet with zero payload, which is apparently 
ok with the RFC, the Ganymed SSH client receive thread throws an exception that 
cause a disconnect.
The ChannelManager msgChannelData() lengh check should be msglen < 9, not 
msglen ≤9 as data packets without payload are not forbidden by the SSH 
Connection Protocol RFC.

Original issue reported on code.google.com by [email protected] on 9 Jan 2014 at 9:13

Attachments:

@GoogleCodeExporter
Copy link
Author

Original comment by cleondris on 10 Feb 2014 at 11:37

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Can you provide a patch and a test case if possible.

Original comment by [email protected] on 9 Apr 2014 at 7:41

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 12 Apr 2014 at 8:32

  • Changed title: Disconnect when SSH server sends data with zero payload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant