]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Clean up downstream sockets when upstream loses its SSH connection.
authorSimon Tatham <anakin@pobox.com>
Sun, 7 Jun 2015 20:09:41 +0000 (21:09 +0100)
committerSimon Tatham <anakin@pobox.com>
Sun, 7 Jun 2015 20:25:03 +0000 (21:25 +0100)
commit0b2f283622603242d8bce295e42342649aebbb97
tree6c658a99c5e71b6dd180f7a8e4f95cea4c2938ec
parent8581676ee9c4ebd6365444d3d98973bf8fe33ccb
Clean up downstream sockets when upstream loses its SSH connection.

If the real SSH connection goes away and we call sharestate_free with
downstreams still active, then that in turn calls share_connstate_free
on all those downstreams, freeing the things their sockets are using
as Plugs but not actually closing the sockets, so further data coming
in from downstream gives rise to a use-after-free bug.

(Thanks to Timothe Litt for a great deal of help debugging this.)
sshshare.c