]> 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>
Sat, 20 Jun 2015 11:47:42 +0000 (12:47 +0100)
commitae93b52a9c80d84470250ae8595d2cdf1448562a
tree36f4cc265d9f0b60268ed799043e1bf3bf01749b
parente6679d46022a8fb8ddb41af29e5c2684f68a7ef2
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.)

(cherry picked from commit 0b2f283622603242d8bce295e42342649aebbb97)
sshshare.c