Subject: Bad window size in WINDOW_ADJUST

Bad window size in WINDOW_ADJUST

From: Jamie Millen <>
Date: Mon, 3 Aug 2009 10:12:29 +0100
I think I have just bumped into the same problem as reported by, at least I am assuming it is the same as this Mailing list entry, I have no way of know what is running on the server I am trying to connect to.

I've done a bit of digging into the RFC's and IETF documents and if this has not yet been fixed I would like to have a go at it, but I have a couple of questions.

The first question is what would be the best way of
recovering from the error? Set the window size to the same as the servers' own window?

The second question is detecting the error.  The response from the server in this particular case is a disconnect message with a reason of SSH_DISCONNECT_PROTOCOL_ERROR. The message data is just the text of the error message.

=> libssh2_transport_read() plain (48 bytes)
0000: 01 00 00 00 02 00 00 00 21 42 61 64 20 77 69 6e ........!Bad win
0010: 64 6f 77 20 73 69 7a 65 20 69 6e 20 57 49 4e 44 dow size in WIND
0020: 4f 57 5f 41 44 4a 55 53 54 2e 00 00 00 02 65 6e OW_ADJUST.....en
[libssh2] 1.686744 Transport: Packet type 1 received, length=48
[libssh2] 1.686766 Transport: Disconnect(2): Bad window size in WINDOW_ADJUST.(en)

There does not appear to be a standard way of rejecting a window adjust request, so are there any suggestions anyone may have for detecting this response from the server other than looking specifically for the above text (which doesn't seem to be a very clean way of fixing it)?

If I do manage to fix it what is the best way of submitting the fix?


This email contains confidential information which may also be legally privileged and subject to protection under the law. It is intended only for the use of the individual or entity named above. If the reader of this email is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient, you are hereby on notice that you are in possession of confidential and privileged information. Any dissemination, distribution or copying of this email is strictly prohibited. If you have received this email in error, please return it by email to the sender and delete the copy from your system.
Worldwide Clinical Trials UK Limited, 201 Bishopsgate, London, EC2M 3AF is Registered in England No. 2244384

Received on 2009-08-03