simon-git: putty (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Mon Sep 13 14:44:24 BST 2021


TL;DR:
  6defb2b3 fd-socket: fix use after free on socket close.
  8f5e9a4f Send PLUGLOG_CONNECT_SUCCESS in proxied socket types.
  a4b8ff91 FdSocket, HandleSocket: store a notional peer address.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2021-09-13 14:44:24

commit 6defb2b3a0a124bf69d0d31478e42a106614fd87
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=6defb2b3a0a124bf69d0d31478e42a106614fd87;hp=64f192093a0eaa94066042936ce637259fd6d047
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Sep 13 14:18:12 2021 +0100

    fd-socket: fix use after free on socket close.
    
    The call to plug_closing very likely destroys the FdSocket entirely,
    so we shouldn't wait until after that to clean up its input fd via
    lots of dereferences.

 unix/fd-socket.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

commit 8f5e9a4f8dc796aee8789847c2a946d1065a7f39
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=8f5e9a4f8dc796aee8789847c2a946d1065a7f39;hp=6defb2b3a0a124bf69d0d31478e42a106614fd87
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Sep 13 14:28:47 2021 +0100

    Send PLUGLOG_CONNECT_SUCCESS in proxied socket types.
    
    Now the non-SSH backends critically depend on it, it's important not
    to forget to send it, for any socket type that's going to be used for
    any of those backends. But ProxySocket, and the Unix and Windows
    'socket' types wrapping pipes to local subprocesses, were not doing
    so.
    
    Some of these socket types don't have a SockAddr available to
    represent the destination host. (Sometimes the concept isn't even
    meaningful). Therefore, I've also expanded the semantics of
    PLUGLOG_CONNECT_SUCCESS so that the addr parameter is allowed to be
    NULL, and invented a noncommittal fallback version of the log message
    in that situation.

 be_misc.c               | 5 ++++-
 network.h               | 7 +++++--
 proxy.c                 | 2 ++
 unix/fd-socket.c        | 8 ++++++++
 windows/handle-socket.c | 8 ++++++++
 5 files changed, 27 insertions(+), 3 deletions(-)

commit a4b8ff911b4abfa1c2247c91d1507687459bab68
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=a4b8ff911b4abfa1c2247c91d1507687459bab68;hp=8f5e9a4f8dc796aee8789847c2a946d1065a7f39
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Sep 13 14:34:46 2021 +0100

    FdSocket, HandleSocket: store a notional peer address.
    
    In the case where these socket types are constructed because of a
    local proxy command, we do actually have a SockAddr representing the
    logical host we were trying to make a connection to. So we might as
    well store it in the socket implementation, and then we can include it
    in the PLUGLOG_CONNECT_SUCCESS call to make the log message more
    informative.

 unix/fd-socket.c            | 13 +++++++++++--
 unix/local-proxy.c          |  5 +----
 unix/platform.h             |  3 ++-
 unix/psusan.c               |  2 +-
 unix/uppity.c               |  2 +-
 windows/handle-socket.c     | 12 ++++++++++--
 windows/local-proxy.c       |  5 +----
 windows/named-pipe-client.c |  3 ++-
 windows/named-pipe-server.c |  2 +-
 windows/platform.h          |  3 ++-
 10 files changed, 32 insertions(+), 18 deletions(-)



More information about the tartarus-commits mailing list