simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Tue Jan 29 20:56:01 GMT 2019


TL;DR:
  715356e6 mkfiles.pl: fix dependencies in .rc preprocessing.
  d4ad7272 Add functions mp_max and mp_max_into.
  9e6669d3 rsa_verify: fix assertion if p,q are different lengths.
  5017d0a6 mpint.c: outlaw mp_ints with nw==0.
  6e7df893 Fix buffer overrun in mp_from_decimal("").
  85b1916c Fix memory leak in rsa_ssh1_savekey.
  ed8a47c1 cmdgen: fix error report after ssh2_userkey_loadpub fails.
  af3ccd79 Unix sk_namelookup: fix compile failure at -DNO_IPV6.
  8329d192 uxnet: clean up callbacks when closing a NetSocket.
  0212b9e5 sk_net_close: fix memory leak of output bufchain.
  a5911f76 Fix null dereference in ssh_unthrottle.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2019-01-29 20:56:01

commit 715356e6d2bfa202f9cc55c2dfdcd32fe280ad57
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=715356e6d2bfa202f9cc55c2dfdcd32fe280ad57;hp=93a5b564397d24fce87c83809dc01ad5e4c824da
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Jan 29 07:54:16 2019 +0000

    mkfiles.pl: fix dependencies in .rc preprocessing.
    
    In the clang-cl makefile, we run the .rc file through the preprocessor
    and the actual resource compiler in two separate steps. But all the
    include-file dependencies were being put on the _latter_ step, so
    editing a .rc2 file didn't trigger a rebuild of the resource file.

 mkfiles.pl | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

commit d4ad7272fdb13740b740720ea529da2099163810
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=d4ad7272fdb13740b740720ea529da2099163810;hp=715356e6d2bfa202f9cc55c2dfdcd32fe280ad57
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Jan 29 20:02:39 2019 +0000

    Add functions mp_max and mp_max_into.
    
    These are easy, and just like the existing mp_min family; I just
    hadn't needed them before now.

 mpint.c            | 12 ++++++++++++
 mpint.h            |  5 ++++-
 test/cryptsuite.py | 13 +++++++++----
 testcrypt.h        |  2 ++
 4 files changed, 27 insertions(+), 5 deletions(-)

commit 9e6669d30ad33d7b3112c100fe11d588f310ae14
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=9e6669d30ad33d7b3112c100fe11d588f310ae14;hp=d4ad7272fdb13740b740720ea529da2099163810
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Jan 29 20:03:10 2019 +0000

    rsa_verify: fix assertion if p,q are different lengths.
    
    The mp_cond_swap that sorts the key's factors into p>q order only
    works if the mp_int representations of p and q have the same nw. It's
    unusual but by no means illegal for an RSA key to be the product of
    wildly different-length primes, so we should cope. Now we sort p and q
    by using mp_min and mp_max.

 sshrsa.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

commit 5017d0a6cab17cceabf7fcf8349e866b421d9df8
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=5017d0a6cab17cceabf7fcf8349e866b421d9df8;hp=9e6669d30ad33d7b3112c100fe11d588f310ae14
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Jan 29 20:03:28 2019 +0000

    mpint.c: outlaw mp_ints with nw==0.
    
    Some functions got confused if given one as input (particularly
    mp_get_decimal, which assumed it could safely write at least one word
    into the inv5 value it makes internally), and I've decided it's easier
    to stop them ever being created than to teach everything to handle
    them correctly. So now mp_make_sized enforces nw != 0 by assertion,
    and I've added a max at any call site that looked as if it might
    violate that precondition.
    
    mp_from_hex("") could generate one of these, in particular, so now
    I've fixed it, I've added a test to make sure it continues doing
    something sensible.

 mpint.c            | 11 ++++++++---
 test/cryptsuite.py |  7 ++++---
 2 files changed, 12 insertions(+), 6 deletions(-)

commit 6e7df89316074992870fdc4b80c8d8c5cf5765b0
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=6e7df89316074992870fdc4b80c8d8c5cf5765b0;hp=5017d0a6cab17cceabf7fcf8349e866b421d9df8
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Jan 29 20:03:35 2019 +0000

    Fix buffer overrun in mp_from_decimal("").
    
    The loop over the input string assumed it could read _one_ byte safely
    before reaching the initial termination test.

 mpint.c            | 2 +-
 test/cryptsuite.py | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

commit 85b1916ca601b309c3b75f55d4d15843c452ba96
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=85b1916ca601b309c3b75f55d4d15843c452ba96;hp=6e7df89316074992870fdc4b80c8d8c5cf5765b0
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Jan 29 20:11:46 2019 +0000

    Fix memory leak in rsa_ssh1_savekey.
    
    The strbuf containing the data of the output key file was never freed.

 sshpubk.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

commit ed8a47c1dd06e30cf49d814c2ad5f2a9c93f807b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=ed8a47c1dd06e30cf49d814c2ad5f2a9c93f807b;hp=85b1916ca601b309c3b75f55d4d15843c452ba96
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Jan 29 20:12:37 2019 +0000

    cmdgen: fix error report after ssh2_userkey_loadpub fails.
    
    We strbuf_free(ssh2blob), but forgot to null the pointer out
    afterwards, which means a subsequent check for NULL believes there
    wasn't a problem, and nulls out the error message pointer instead!

 cmdgen.c | 1 +
 1 file changed, 1 insertion(+)

commit af3ccd794643e37f8fd711b9d6c0ccf2f4d8bd3b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=af3ccd794643e37f8fd711b9d6c0ccf2f4d8bd3b;hp=ed8a47c1dd06e30cf49d814c2ad5f2a9c93f807b
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Jan 29 20:13:12 2019 +0000

    Unix sk_namelookup: fix compile failure at -DNO_IPV6.
    
    The variable 'strbuf *realhost' was only initialised in the branch of
    the ifdefs where IPV6 is enabled, so at NO_IPV6, it's used
    uninitialised, which in my usual build configuration means a compile
    failure.

 unix/uxnet.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

commit 8329d192be5b2bcd1be61634e0b689ecf2a810a8
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=8329d192be5b2bcd1be61634e0b689ecf2a810a8;hp=af3ccd794643e37f8fd711b9d6c0ccf2f4d8bd3b
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Jan 29 20:15:43 2019 +0000

    uxnet: clean up callbacks when closing a NetSocket.
    
    uxnet.c's method for passing socket errors on to the Plug involves
    setting up a toplevel callback using the NetSocket itself as the
    context. Therefore, it should call delete_callbacks_for_context when
    it destroys a NetSocket. For example, if _two_ socket errors manage to
    occur, and the first one causes the socket to be closed, you need the
    second callback to not happen, or it'll dereference the freed pointer.

 unix/uxnet.c | 1 +
 1 file changed, 1 insertion(+)

commit 0212b9e5e5cb55ecaf678a65c2ef0d8d968c8a26
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=0212b9e5e5cb55ecaf678a65c2ef0d8d968c8a26;hp=8329d192be5b2bcd1be61634e0b689ecf2a810a8
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Jan 29 20:13:47 2019 +0000

    sk_net_close: fix memory leak of output bufchain.
    
    If there was still pending output data on a NetSocket's output_data
    bufchain when it was closed, then we wouldn't have freed it, on either
    Unix or Windows.

 unix/uxnet.c     | 2 ++
 windows/winnet.c | 2 ++
 2 files changed, 4 insertions(+)

commit a5911f76d02b0de6fbc20b4c943ee33f54b432af
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=a5911f76d02b0de6fbc20b4c943ee33f54b432af;hp=0212b9e5e5cb55ecaf678a65c2ef0d8d968c8a26
Author: Simon Tatham <anakin at pobox.com>
Date:   Tue Jan 29 20:31:47 2019 +0000

    Fix null dereference in ssh_unthrottle.
    
    The backend_unthrottle function gets called when the backlog on stdout
    clears, and it's possible for that to happen _after_ the SSH backend
    has terminated the connection and freed all its protocol modules (e.g.
    if a protocol error occurred on the network while data was still
    waiting to be written to stdout). So ssh_unthrottle should check that
    ssh->cl still exists before calling any method of it.

 ssh.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



More information about the tartarus-commits mailing list