simon-svn: putty: simon

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Sun Sep 8 14:20:49 BST 2013


SVN root:       svn://svn.tartarus.org/sgt
Changes by:     simon
Revision:       10039
Date:           2013-09-08 14:20:49 +0100 (Sun, 08 Sep 2013)

Log message (16 lines):
Handle socket errors on half-open channels.

Anthony Ho reports that this can occur naturally in some situation
involving Windows 8 + IE 11 and dynamic port forwarding: apparently we
get through the SOCKS negotiation, send our CHANNEL_OPEN, and then
*immediately* suffer a local WSAECONNABORTED error before the server
has sent back its OPEN_CONFIRMATION or OPEN_FAILURE. In this situation
ssh2_channel_check_close was failing to notice that the channel didn't
yet have a valid server id, and sending out a CHANNEL_CLOSE anyway
containing 32 bits of uninitialised nonsense.

We now handle this by turning our half-open CHAN_SOCKDATA_DORMANT into
a half-open CHAN_ZOMBIE, which means in turn that our handler
functions for OPEN_CONFIRMATION and OPEN_FAILURE have to recognise and
handle that case, the former by immediately initiating channel closure
once we _do_ have the channel's server id to do it with.

Modified files:
U   putty/ssh.c

Links:
http://svn.tartarus.org/sgt/?rev=10039&view=rev
http://svn.tartarus.org/sgt/putty/ssh.c?rev=10039&r1=10038&r2=10039



More information about the tartarus-commits mailing list