]> asedeno.scripts.mit.edu Git - PuTTY.git/log
PuTTY.git
9 years agoPaste error in comment.
Simon Tatham [Mon, 27 Apr 2015 05:54:21 +0000 (06:54 +0100)]
Paste error in comment.

SSH2_MSG_KEX_DH_GEX_REQUEST_OLD and SSH2_MSG_KEX_DH_GEX_REQUEST were
correctly _defined_ as different numbers, but the comments to the
right containing the hex representations of their values were
accidentally the same.

9 years agoAdd smemclrs of all hash states we destroy.
Simon Tatham [Sun, 26 Apr 2015 22:55:33 +0000 (23:55 +0100)]
Add smemclrs of all hash states we destroy.

9 years agoUse a timing-safe memory compare to verify MACs.
Simon Tatham [Sun, 26 Apr 2015 22:31:11 +0000 (23:31 +0100)]
Use a timing-safe memory compare to verify MACs.

Now that we have modes in which the MAC verification happens before
any other crypto operation and hence will be the only thing seen by an
attacker, it seems like about time we got round to doing it in a
cautious way that tries to prevent the attacker from using our memcmp
as a timing oracle.

So, here's an smemeq() function which has the semantics of !memcmp but
attempts to run in time dependent only on the length parameter. All
the MAC implementations now use this in place of !memcmp to verify the
MAC on input data.

9 years agoSupport OpenSSH encrypt-then-MAC protocol extension.
Simon Tatham [Sun, 26 Apr 2015 22:30:32 +0000 (23:30 +0100)]
Support OpenSSH encrypt-then-MAC protocol extension.

This causes the initial length field of the SSH-2 binary packet to be
unencrypted (with the knock-on effect that now the packet length not
including MAC must be congruent to 4 rather than 0 mod the cipher
block size), and then the MAC is applied over the unencrypted length
field and encrypted ciphertext (prefixed by the sequence number as
usual). At the cost of exposing some information about the packet
lengths to an attacker (but rarely anything they couldn't have
inferred from the TCP headers anyway), this closes down any
possibility of a MITM using the client as a decryption oracle, unless
they can _first_ fake a correct MAC.

ETM mode is enabled by means of selecting a different MAC identifier,
all the current ones of which are constructed by appending
"-etm@openssh.com" to the name of a MAC that already existed.

We currently prefer the original SSH-2 binary packet protocol (i.e. we
list all the ETM-mode MACs last in our KEXINIT), on the grounds that
it's better tested and more analysed, so at the moment the new mode is
only activated if a server refuses to speak anything else.

9 years agoFix a few memory leaks.
Simon Tatham [Sun, 26 Apr 2015 09:49:24 +0000 (10:49 +0100)]
Fix a few memory leaks.

Patch due to Chris Staite.

9 years agoDivide the Bugs panel in half.
Simon Tatham [Sat, 25 Apr 2015 09:46:56 +0000 (10:46 +0100)]
Divide the Bugs panel in half.

It overflowed as a result of the previous commit.

9 years agoSupport RFC 4419.
Simon Tatham [Sat, 25 Apr 2015 09:46:53 +0000 (10:46 +0100)]
Support RFC 4419.

PuTTY now uses the updated version of Diffie-Hellman group exchange,
except for a few old OpenSSH versions which Darren Tucker reports only
support the old version.

FIXME: this needs further work because the Bugs config panel has now
overflowed.

9 years agoOld Dropbear servers have the ssh-close-vs-request bug.
Jacob Nevins [Thu, 23 Apr 2015 22:42:45 +0000 (23:42 +0100)]
Old Dropbear servers have the ssh-close-vs-request bug.

Add automatic bug detection. (Versions verified by Matt Johnston.)

9 years agoFix a dangerous cross-thread memory access.
Simon Tatham [Tue, 7 Apr 2015 21:17:08 +0000 (22:17 +0100)]
Fix a dangerous cross-thread memory access.

When a winhandl.c input thread returns EOF to the main thread, the
latter might immediately delete the input thread's context. I
carefully wrote in a comment that in that case we had to not touch ctx
ever again after signalling to the main thread - but the test for
whether that was true, which also touched ctx, itself came _after_ the
SetEvent which sent that signal. Ahem.

Spotted by Minefield, which it looks as if I haven't run for a while.

9 years agoClean up a stale foreign handle in winnps.c.
Simon Tatham [Tue, 7 Apr 2015 20:54:41 +0000 (21:54 +0100)]
Clean up a stale foreign handle in winnps.c.

I had set up an event object for signalling incoming connections to
the named pipe, and then called handle_add_foreign_event to get that
event object watched for connections - but when I closed down the
listening pipe, I deleted the event object without also cancelling
that foreign-event handle, so that winhandl.c would potentially call
the callback for a destroyed object.

9 years agoDon't output negative numbers in the ESC[13t report.
Simon Tatham [Sat, 7 Mar 2015 20:57:26 +0000 (20:57 +0000)]
Don't output negative numbers in the ESC[13t report.

A minus sign is illegal at that position in a control sequence, so if
ESC[13t should report something like ESC[3;-123;234t then we won't
accept it as input. Switch to printing the numbers as unsigned, so
that negative window coordinates are output as their 32-bit two's
complement; experimentation suggests that PuTTY does accept that on
input.

9 years agoStop Windows PuTTY becoming unresponsive if server floods us.
Simon Tatham [Sat, 7 Mar 2015 17:10:36 +0000 (17:10 +0000)]
Stop Windows PuTTY becoming unresponsive if server floods us.

This was an old bug, fixed around 0.59, which apparently regressed
when I rewrote the main event loop using the toplevel_callback
mechanism.

Investigation just now suggests that it has to do with my faulty
assumption that Windows PeekMessage would deliver messages in its
message queue in FIFO order (i.e. that the thing calling itself a
message queue is actually a _queue_). In fact my WM_NETEVENT seems to
like to jump the queue, so that once a steady stream of them starts
arriving, we never do anything else in the main event loop (except
deal with handles).

Worked around in a simple and slightly bodgy way, namely, we don't
stop looping on PeekMessage and run our toplevel callbacks until we've
either run out of messages completely or else seen at least one that
_isn't_ a WM_NETEVENT. That way we should reliably interleave NETEVENT
processing with processing of other stuff.

9 years agoMove kh2reg.py link from svn to git.
Jacob Nevins [Sun, 1 Mar 2015 12:27:27 +0000 (12:27 +0000)]
Move kh2reg.py link from svn to git.

9 years agoMinimal documentation for ECDSA/ECDH support.
Jacob Nevins [Sat, 28 Feb 2015 19:08:15 +0000 (19:08 +0000)]
Minimal documentation for ECDSA/ECDH support.

9 years agoAdd a new checklist item.
Simon Tatham [Sat, 28 Feb 2015 15:47:45 +0000 (15:47 +0000)]
Add a new checklist item.

I managed to build from completely the wrong commit this morning, so
make sure to double-check next time!

9 years agoTypo.
Simon Tatham [Sat, 28 Feb 2015 13:10:55 +0000 (13:10 +0000)]
Typo.

9 years agoReorganise the release checklist.
Simon Tatham [Sat, 28 Feb 2015 12:04:54 +0000 (12:04 +0000)]
Reorganise the release checklist.

Mostly I'm rearranging things because of the new workflows that git
makes available - it's now possible (and indeed sensible) to prepare a
lot of stuff in a fairly relaxed manner in local checkouts, and then
the process of going live with the release has a lot less manual
writing of stuff and a lot more mechanical 'git push' and running of
update scripts.

However, there's one new item that was actually missed off the
previous checklist: turning off nightly pre-release builds after
making the release they were a pre-release of. Ahem.

9 years agoNew 'contrib' tool: a script for faking initial KEX.
Simon Tatham [Sat, 28 Feb 2015 07:58:29 +0000 (07:58 +0000)]
New 'contrib' tool: a script for faking initial KEX.

encodelib.py is a Python library which implements some handy SSH-2
encoding primitives; samplekex.py uses that to fabricate the start of
an SSH connection, up to the point where key exchange totally fails
its crypto.

The idea is that you adapt samplekex.py to construct initial-kex
sequences with particular properties, in order to test robustness and
security fixes that affect the initial-kex sequence. For example, I
used an adaptation of this to test the Diffie-Hellman range check
that's just gone into 0.64.

9 years agoMerge branch 'pre-0.64'
Simon Tatham [Sat, 28 Feb 2015 07:57:58 +0000 (07:57 +0000)]
Merge branch 'pre-0.64'

9 years agoBump version number for 0.64 release. 0.64
Simon Tatham [Fri, 27 Feb 2015 22:42:03 +0000 (22:42 +0000)]
Bump version number for 0.64 release.

9 years agoAdd some missing smemclrs and sfrees.
Simon Tatham [Thu, 19 Feb 2015 20:08:18 +0000 (20:08 +0000)]
Add some missing smemclrs and sfrees.

The absence of these could have prevented sensitive private key
information from being properly cleared out of memory that PuTTY tools
had finished with.

Thanks to Patrick Coleman for spotting this and sending a patch.

9 years agoFix an erroneous length field in SSH-1 key load.
Simon Tatham [Thu, 19 Feb 2015 20:05:10 +0000 (20:05 +0000)]
Fix an erroneous length field in SSH-1 key load.

We incremented buf by a few bytes, so we must decrement the
corresponding length by the same amount, or else makekey() could
overrun.

Thanks to Patrick Coleman for the patch.

9 years agoEnforce acceptable range for Diffie-Hellman server value.
Simon Tatham [Thu, 5 Feb 2015 19:39:17 +0000 (19:39 +0000)]
Enforce acceptable range for Diffie-Hellman server value.

Florent Daigniere of Matta points out that RFC 4253 actually
_requires_ us to refuse to accept out-of-range values, though it isn't
completely clear to me why this should be a MUST on the receiving end.

Matta considers this to be a security vulnerability, on the grounds
that if a server should accidentally send an obviously useless value
such as 1 then we will fail to reject it and agree a key that an
eavesdropper could also figure out. Their id for this vulnerability is
MATTA-2015-002.

9 years agoMerge branch 'pre-0.64'
Jacob Nevins [Fri, 27 Feb 2015 09:28:05 +0000 (09:28 +0000)]
Merge branch 'pre-0.64'

9 years agoRefresh the Windows installer README.txt.
Jacob Nevins [Fri, 27 Feb 2015 09:26:47 +0000 (09:26 +0000)]
Refresh the Windows installer README.txt.

The most recent version of Windows it acknowledged was XP.

9 years agoMerge branch 'pre-0.64'
Jacob Nevins [Tue, 24 Feb 2015 10:37:53 +0000 (10:37 +0000)]
Merge branch 'pre-0.64'

9 years agoMake kh2reg.py compatible with modern Python.
Jacob Nevins [Tue, 24 Feb 2015 10:30:18 +0000 (10:30 +0000)]
Make kh2reg.py compatible with modern Python.

Bare string exceptions aren't supported any more.
Patch by Will Aoki, plus a backward compatibility tweak from Colin Watson.
Seen working with Python 2.4.3 and 2.7.6.

9 years agoImprove comments in winhandl.c.
Simon Tatham [Sat, 7 Feb 2015 11:48:49 +0000 (11:48 +0000)]
Improve comments in winhandl.c.

To understand the handle leak bug that I fixed in git commit
7549f2da40d3666f2c9527d84d9ed5468e231691, I had to think fairly hard
to remind myself what all this code was doing, which means the
comments weren't good enough. Expanded and rewritten some of them in
the hope that things will be clearer next time.

9 years agoMerge branch 'pre-0.64'
Simon Tatham [Sat, 7 Feb 2015 12:50:31 +0000 (12:50 +0000)]
Merge branch 'pre-0.64'

9 years agoMark handles defunct before calling gotdata/sentdata.
Simon Tatham [Sat, 7 Feb 2015 12:39:47 +0000 (12:39 +0000)]
Mark handles defunct before calling gotdata/sentdata.

If (say) a read handle returns EOF, and its gotdata function responds
by calling handle_free(), then we want the handle to have already had
its defunct flag set so that the handle can be destroyed. Otherwise
handle_free will set the 'done' flag to ask the subthread to
terminate, and then sit and wait for it to say it's done so -
forgetting that it signalled termination already by returning EOF, and
hence will not be responding to that signal.

Ditto for write errors on write handles, though that should happen
less often.

9 years agoFix handle leak in winhandl.c.
Simon Tatham [Sat, 7 Feb 2015 11:48:19 +0000 (11:48 +0000)]
Fix handle leak in winhandl.c.

The code for cleaning up handle structures works by the main thread
asking the per-handle subthread to shut down by means of setting its
'done' flag, and then once the subthread signals back through its
event object that it's done so, the main thread frees all its
resources and removes the event object from the list of things being
checked in the program's event loop.

But read threads were not sending back that final event acknowledging
a request to shut down, so their event objects were never being
cleaned up.

Bug spotted by Ronald Weiss.

9 years agoMerge branch 'pre-0.64'
Jacob Nevins [Sun, 18 Jan 2015 14:50:20 +0000 (14:50 +0000)]
Merge branch 'pre-0.64'

9 years agoRemove user-key-oriented advice from host key docs.
Jacob Nevins [Sun, 18 Jan 2015 14:44:45 +0000 (14:44 +0000)]
Remove user-key-oriented advice from host key docs.

It would be rare to have a host keypair in .ppk format or on a client
machine to load into PuTTYgen, and it might confuse people into thinking
they are required to do so.

9 years agoMerge branch 'pre-0.64'
Jacob Nevins [Thu, 8 Jan 2015 23:50:34 +0000 (23:50 +0000)]
Merge branch 'pre-0.64'

9 years agoUse local username consistently in Unix Plink.
Jacob Nevins [Mon, 5 Jan 2015 23:41:43 +0000 (23:41 +0000)]
Use local username consistently in Unix Plink.

It tries to use the local username as the remote username if it has no
better ideas, but the presence of Default Settings would defeat this,
even if it had no username set. Reported by Jonathan Amery.

9 years agoMerge branch 'pre-0.64'
Jacob Nevins [Mon, 5 Jan 2015 23:49:25 +0000 (23:49 +0000)]
Merge branch 'pre-0.64'

9 years agoFix a copy-and-pasted comment.
Jacob Nevins [Mon, 5 Jan 2015 23:41:24 +0000 (23:41 +0000)]
Fix a copy-and-pasted comment.

9 years agoIt's a new year.
Jacob Nevins [Mon, 5 Jan 2015 23:48:01 +0000 (23:48 +0000)]
It's a new year.

9 years agoMerge branch 'pre-0.64'
Simon Tatham [Sat, 20 Dec 2014 18:52:40 +0000 (18:52 +0000)]
Merge branch 'pre-0.64'

9 years agoDo an smemclr(bytes) in bignum_random_in_range.
Simon Tatham [Sat, 20 Dec 2014 18:44:36 +0000 (18:44 +0000)]
Do an smemclr(bytes) in bignum_random_in_range.

It's used for sensitive data, so we shouldn't leave it lying around
after free.

9 years agoFix memory management in bignum_random_in_range.
Simon Tatham [Sat, 20 Dec 2014 18:43:46 +0000 (18:43 +0000)]
Fix memory management in bignum_random_in_range.

We were allocating a new array in which to make up a random number
every time we went round the loop, and not freeing any of them. Now we
allocate a single array to use for all loop iterations, and clear and
free it properly afterwards.

Patch due to Tim Kosse.

9 years agoFix a handle leak in Windows PSFTP.
Simon Tatham [Sat, 20 Dec 2014 18:42:22 +0000 (18:42 +0000)]
Fix a handle leak in Windows PSFTP.

We were checking the return value of CreateThread for validity, but
not keeping it to free afterwards if it _was_ valid. Also, we weren't
closing ctx->event in the valid case either. Patch due to Tim Kosse.

9 years agoFixes to memory management in the elliptic curve code.
Simon Tatham [Sat, 20 Dec 2014 17:07:17 +0000 (17:07 +0000)]
Fixes to memory management in the elliptic curve code.

There was an error-handling path testing the wrong variable; an
inappropriate call to ec_point_free in decodepoint() (in fact, that
function always gets passed a pointer to an ec_point structure that's
not a dynamically allocated block at all or not in its own right, so
we should have just cleared its contents without freeing the structure
itself); a missing return on an error path which would have caused the
same structure to be freed a second time; and two missing freebn in
ecdsa_sign.

Patch due to Tim Kosse.

9 years agoAdd a missing freeaddrinfo() in Unix sk_newlistener.
Simon Tatham [Sat, 20 Dec 2014 16:54:28 +0000 (16:54 +0000)]
Add a missing freeaddrinfo() in Unix sk_newlistener.

If we use getaddrinfo to translate the source IP address into a
sockaddr, then we need to freeaddrinfo the returned data later. Patch
due to Tim Kosse.

9 years agoClose the remote file handle if sftp_put_file's fstat fails.
Simon Tatham [Sat, 20 Dec 2014 16:53:01 +0000 (16:53 +0000)]
Close the remote file handle if sftp_put_file's fstat fails.

Instead of abruptly returning from sftp_put_file in that situation, we
now send an FXP_CLOSE instead. Patch due to Tim Kosse.

9 years agoMerge branch 'pre-0.64'
Simon Tatham [Sat, 22 Nov 2014 16:42:01 +0000 (16:42 +0000)]
Merge branch 'pre-0.64'

9 years agoStop referring to Plink as "PuTTY Link".
Simon Tatham [Sat, 22 Nov 2014 16:38:01 +0000 (16:38 +0000)]
Stop referring to Plink as "PuTTY Link".

I don't think anyone has ever actually called it that, colloquially
_or_ formally, and if anyone ever did (in a bug report, say) I'd
probably have to stop and think to work out what they meant. It's
universally called Plink, and should be officially so as well :-)

9 years agoAnother missing initialisation.
Simon Tatham [Sat, 22 Nov 2014 16:35:54 +0000 (16:35 +0000)]
Another missing initialisation.

This one spotted in the old-fashioned way, by actually attempting a
Plink raw connection and wondering why it didn't seem to be reading
from standard input! Turns out 'bufsize' is uninitialised until the
first send, which can inhibit any stdin reading if it gets a large
enough nonsense value.

9 years agoConsistently use &def for %makefile_extra pieces.
Simon Tatham [Sat, 22 Nov 2014 16:30:29 +0000 (16:30 +0000)]
Consistently use &def for %makefile_extra pieces.

mkfiles.pl was giving a couple of annoying perl warnings, because some
makefile_extra strings were never set by Recipe. We already have the
&def function to convert undefs into "" for this reason, but weren't
using it everywhere. Now I think we are.

9 years agoMove echo/edit state change functionality out of ldisc_send.
Simon Tatham [Sat, 22 Nov 2014 16:12:47 +0000 (16:12 +0000)]
Move echo/edit state change functionality out of ldisc_send.

I'm not actually sure why we've always had back ends notify ldisc of
changes to echo/edit settings by giving ldisc_send(ldisc,NULL,0,0) a
special meaning, instead of by having a separate dedicated notify
function with its own prototype and parameter set. Coverity's recent
observation that the two kinds of call don't even have the same
requirements on the ldisc (particularly, whether ldisc->term can be
NULL) makes me realise that it's really high time I separated the two
conceptually different operations into actually different functions.

While I'm here, I've renamed the confusing ldisc_update() function
which that special operation ends up feeding to, because it's not
actually a function applying to an ldisc - it applies to a front end.
So ldisc_send(ldisc,NULL,0,0) is now ldisc_echoedit_update(ldisc), and
that in turn figures out the current echo/edit settings before passing
them on to frontend_echoedit_update(). I think that should be clearer.

9 years agoMerge branch 'pre-0.64'
Simon Tatham [Sat, 22 Nov 2014 16:02:01 +0000 (16:02 +0000)]
Merge branch 'pre-0.64'

9 years agoAdd some missing initialisations.
Simon Tatham [Sat, 22 Nov 2014 14:57:06 +0000 (14:57 +0000)]
Add some missing initialisations.

Spotted by valgrind, after I was testing all the Coverity bug fixes :-)

9 years agoDon't reject _and_ accept X forwarding requests!
Simon Tatham [Sat, 22 Nov 2014 09:59:37 +0000 (09:59 +0000)]
Don't reject _and_ accept X forwarding requests!

If a sharing downstream asks for an auth method we don't understand,
we should send them CHANNEL_FAILURE *and then stop processing*. Ahem.

(Spotted while examining this code in the course of Coverity-related
fixes, but not itself a Coverity-found problem.)

9 years agoFix assorted memory leaks.
Simon Tatham [Sat, 22 Nov 2014 09:58:15 +0000 (09:58 +0000)]
Fix assorted memory leaks.

All spotted by Coverity.

9 years agoFix uninitialised variable in two Windows event loops.
Simon Tatham [Sat, 22 Nov 2014 10:18:16 +0000 (10:18 +0000)]
Fix uninitialised variable in two Windows event loops.

If (Msg)WaitForMultipleObjects returns WAIT_TIMEOUT, we expect 'next'
to have been initialised. This can occur without having called
run_timers(), if a toplevel callback was pending, so we can't expect
run_timers to have reliably initialised 'next'.

I'm not actually convinced this could have come up in either of the
affected programs (Windows PSFTP and Plink), due to the list of things
toplevel callbacks are currently used for, but it certainly wants
fixing anyway for the future.

Spotted by Coverity.

9 years agoClarify when ldisc->term may be NULL.
Simon Tatham [Sat, 22 Nov 2014 10:37:14 +0000 (10:37 +0000)]
Clarify when ldisc->term may be NULL.

Namely, any ldisc that you send actual data through should have a
terminal attached, because the ldisc editing/echoing system is
designed entirely for use with a terminal. The only time you can have
an ldisc with no terminal is when it's only ever used by the backend
to report changes to the front end in edit/echo status, e.g. by Unix
Plink.

Coverity spotted an oddity in ldisc_send which after a while I decided
would never have actually caused a problem, but OTOH I agree that it
was confusing, so now hopefully it's less so.

9 years agoFix typo in validate_manual_hostkey().
Simon Tatham [Sat, 22 Nov 2014 10:12:47 +0000 (10:12 +0000)]
Fix typo in validate_manual_hostkey().

'p += strcspn' returns p always non-NULL and sometimes pointing at \0,
as opposed to 'p = strchr' which returns p sometimes non-NULL and
never pointing at \0. Test the pointer after the call accordingly.
Thanks, Coverity.

9 years agoMerge connection-sharing shutdown fix from pre-0.64.
Simon Tatham [Mon, 10 Nov 2014 18:32:12 +0000 (18:32 +0000)]
Merge connection-sharing shutdown fix from pre-0.64.

9 years agoShut down connshare upstream along with the SSH connection.
Simon Tatham [Mon, 10 Nov 2014 18:29:00 +0000 (18:29 +0000)]
Shut down connshare upstream along with the SSH connection.

This ought to happen in ssh_do_close alongside the code that shuts
down other local listening things like port forwardings, for the same
obvious reason. In particular, we should get through this _before_ we
put up a modal dialog box telling the user what just went wrong with
the SSH connection, so that further sessions started while that box is
active don't try futilely to connect to the not-really-listening
zombie upstream.

9 years agoMerge branch 'pre-0.64'.
Jacob Nevins [Sun, 9 Nov 2014 12:41:10 +0000 (12:41 +0000)]
Merge branch 'pre-0.64'.

9 years agoFree copied Conf in log_free().
Jacob Nevins [Sun, 9 Nov 2014 00:54:35 +0000 (00:54 +0000)]
Free copied Conf in log_free().

Thanks to Corey Stup for pointing it out.

9 years agoMerge reconfig fixes from branch 'pre-0.64'.
Jacob Nevins [Sun, 9 Nov 2014 00:12:51 +0000 (00:12 +0000)]
Merge reconfig fixes from branch 'pre-0.64'.

9 years agoDisable some mid-session configs for downstreams.
Jacob Nevins [Sun, 9 Nov 2014 00:10:46 +0000 (00:10 +0000)]
Disable some mid-session configs for downstreams.

Compression, encryption, and key exchange settings are all meaningless
to reconfigure in connection-sharing downstreams.

9 years agoDisable manual host key config in mid-session.
Jacob Nevins [Sun, 9 Nov 2014 00:08:36 +0000 (00:08 +0000)]
Disable manual host key config in mid-session.

Changing it can't have any useful effect, since we have strictly
enforced that the host key used for rekeys is the same as the first key
exchange since b8e668c.

9 years agoMerge another docs fix from 'pre-0.64'.
Jacob Nevins [Sat, 8 Nov 2014 23:38:52 +0000 (23:38 +0000)]
Merge another docs fix from 'pre-0.64'.

9 years agoDocument IPv6 literal syntax for tunnels.
Jacob Nevins [Sat, 8 Nov 2014 23:37:59 +0000 (23:37 +0000)]
Document IPv6 literal syntax for tunnels.

9 years agoMerge Gtk event log fix from 'pre-0.64'.
Jacob Nevins [Sat, 8 Nov 2014 22:22:45 +0000 (22:22 +0000)]
Merge Gtk event log fix from 'pre-0.64'.

9 years agoFix a double-free in the Gtk event log.
Jacob Nevins [Sat, 8 Nov 2014 22:22:34 +0000 (22:22 +0000)]
Fix a double-free in the Gtk event log.

It could occur some time after a line was selected in the event log
window.

9 years agoMerge SSH-2-only default from 'pre-0.64'.
Jacob Nevins [Sat, 8 Nov 2014 19:35:57 +0000 (19:35 +0000)]
Merge SSH-2-only default from 'pre-0.64'.

9 years agoMerge misc docs improvements from branch 'pre-0.64'.
Jacob Nevins [Sat, 8 Nov 2014 19:32:42 +0000 (19:32 +0000)]
Merge misc docs improvements from branch 'pre-0.64'.

9 years agoDiscourage SSH-1 in documentation.
Jacob Nevins [Sat, 8 Nov 2014 18:37:43 +0000 (18:37 +0000)]
Discourage SSH-1 in documentation.

9 years agoCross-reference 'logical host' and host key config docs.
Jacob Nevins [Sat, 8 Nov 2014 18:34:24 +0000 (18:34 +0000)]
Cross-reference 'logical host' and host key config docs.

9 years agoDon't try SSH-1 by default.
Jacob Nevins [Sat, 8 Nov 2014 18:37:00 +0000 (18:37 +0000)]
Don't try SSH-1 by default.

9 years agoTweak key file config docs re Pageant.
Jacob Nevins [Sat, 8 Nov 2014 18:32:31 +0000 (18:32 +0000)]
Tweak key file config docs re Pageant.

Clarify that it's not necessary to faff around with explicit key
configuration if you're using Pageant.

9 years agoTweak SSH protocol version refusal messages.
Jacob Nevins [Sat, 8 Nov 2014 18:35:31 +0000 (18:35 +0000)]
Tweak SSH protocol version refusal messages.

"required by user" will grate if the user did not configure the
behaviour (and I'm about to change the default to `2 only').

9 years agoRearrange SSH bug docs to match the GUI.
Jacob Nevins [Sat, 8 Nov 2014 18:31:15 +0000 (18:31 +0000)]
Rearrange SSH bug docs to match the GUI.

No change to the text.

9 years agoClarify that port forwarding is of TCP connections.
Jacob Nevins [Sat, 8 Nov 2014 18:30:01 +0000 (18:30 +0000)]
Clarify that port forwarding is of TCP connections.

(Rather than just the generic 'network connections'.)

9 years agoRefer to X11 'graphical applications'.
Jacob Nevins [Sat, 8 Nov 2014 18:29:08 +0000 (18:29 +0000)]
Refer to X11 'graphical applications'.

For people who know they need graphical applications but don't know what
X11 is.

9 years agoCorrect default lines of scrollback in the docs.
Jacob Nevins [Sat, 8 Nov 2014 17:12:24 +0000 (17:12 +0000)]
Correct default lines of scrollback in the docs.

The default was increased in fd266a3 (just before 0.63).

9 years agoMerge shorter option name from 'pre-0.64'.
Jacob Nevins [Tue, 4 Nov 2014 18:38:46 +0000 (18:38 +0000)]
Merge shorter option name from 'pre-0.64'.

9 years agoUse a shorter name for the channel close bug.
Jacob Nevins [Tue, 4 Nov 2014 18:35:36 +0000 (18:35 +0000)]
Use a shorter name for the channel close bug.

The old name was too long for the Windows configuration dialog, so the
last word got lost.

9 years agoRewrap Windows licence dialogs.
Jacob Nevins [Mon, 3 Nov 2014 23:45:47 +0000 (23:45 +0000)]
Rewrap Windows licence dialogs.

The extra contributor pushed one line past the edge.

9 years agoRemove test code from Windows Pageant.
Jacob Nevins [Mon, 3 Nov 2014 23:34:13 +0000 (23:34 +0000)]
Remove test code from Windows Pageant.

(At least, I assume that's what it was.)

9 years agoMerge MinGW surrogate build fix from pre-0.64.
Jacob Nevins [Mon, 3 Nov 2014 23:20:39 +0000 (23:20 +0000)]
Merge MinGW surrogate build fix from pre-0.64.

9 years agoFix definition of surrogate macros.
Jacob Nevins [Mon, 3 Nov 2014 23:09:18 +0000 (23:09 +0000)]
Fix definition of surrogate macros.

Define HIGH_SURROGATE_START etc even if IS_HIGH_SURROGATE is defined,
as they are used elsewhere too. This is necessary to build with recent
MinGW.

9 years agoFactor out code for constructing lists of algorithms for SSH-2 KEXINIT.
Ben Harris [Mon, 3 Nov 2014 00:55:21 +0000 (00:55 +0000)]
Factor out code for constructing lists of algorithms for SSH-2 KEXINIT.

9 years agoFix some rogue // comments.
Simon Tatham [Mon, 3 Nov 2014 18:41:56 +0000 (18:41 +0000)]
Fix some rogue // comments.

That's what you get for changing things at the last minute...

9 years agoFix details of the Pageant and PuTTYgen GUIs for ECDSA.
Simon Tatham [Sat, 1 Nov 2014 19:33:29 +0000 (19:33 +0000)]
Fix details of the Pageant and PuTTYgen GUIs for ECDSA.

Pageant's list box needs its tab stops reorganised a little for new
tendencies in string length, and also has to cope with there only
being one prefix space in the output of the new string fingerprint
function. PuTTYgen needs to squash more radio buttons on to one line.

9 years agoAdd Christopher Staite to the list of copyright holders.
Simon Tatham [Sat, 1 Nov 2014 09:48:21 +0000 (09:48 +0000)]
Add Christopher Staite to the list of copyright holders.

9 years agoElliptic-curve cryptography support.
Chris Staite [Sat, 1 Nov 2014 09:45:20 +0000 (09:45 +0000)]
Elliptic-curve cryptography support.

This provides support for ECDSA public keys, for both hosts and users,
and also ECDH key exchange. Supported curves are currently just the
three NIST curves required by RFC 5656.

9 years agoSome extra bignum functions: modsub, lshift, random_in_range.
Chris Staite [Sat, 1 Nov 2014 09:15:08 +0000 (09:15 +0000)]
Some extra bignum functions: modsub, lshift, random_in_range.

9 years agoProvide SHA-384 and SHA-512 as hashes usable in SSH KEX.
Chris Staite [Sat, 1 Nov 2014 08:59:25 +0000 (08:59 +0000)]
Provide SHA-384 and SHA-512 as hashes usable in SSH KEX.

SHA-384 was previously not implemented at all, but is a trivial
adjustment to SHA-512 (different starting constants, and truncate the
output hash). Both are now exposed as 'ssh_hash' structures so that
key exchange methods can ask for them.

9 years agoRefactoring to prepare for extra public key types.
Chris Staite [Sat, 1 Nov 2014 09:14:19 +0000 (09:14 +0000)]
Refactoring to prepare for extra public key types.

The OpenSSH key importer and exporter were structured in the
assumption that the strong commonality of format between OpenSSH RSA
and DSA keys would persist across all key types. Moved code around so
it's now clear that this is a peculiarity of those _particular_ two
key types which will not apply to others we add alongside them.

Also, a boolean 'is_dsa' in winpgen.c has been converted into a more
sensible key type enumeration, and the individually typed key pointers
have been piled on top of each other in a union.

This is a pure refactoring change which should have no functional
effect.

9 years agoFactor out the DSA deterministic k generator.
Simon Tatham [Sat, 1 Nov 2014 19:48:48 +0000 (19:48 +0000)]
Factor out the DSA deterministic k generator.

It's now a separate function, which you call with an identifying
string to be hashed into the generation of x. The idea is that other
DSA-like signature algorithms can reuse the same function, with a
different id string.

As a minor refinement, we now also never return k=1.

9 years agoAdd some missing invariants in bigdiv and bigmod.
Simon Tatham [Sat, 1 Nov 2014 19:20:51 +0000 (19:20 +0000)]
Add some missing invariants in bigdiv and bigmod.

The underlying function 'bigdivmod' does not ensure either of its
outputs is normalised, so its callers must do so.

9 years agoRemove an unused variable.
Ben Harris [Sat, 1 Nov 2014 18:43:35 +0000 (18:43 +0000)]
Remove an unused variable.

As far as I can tell, it's been unused ever since it was introduced in
2001.

9 years agoReport correct error when FormatMessage fails.
Ben Harris [Sat, 1 Nov 2014 17:43:54 +0000 (17:43 +0000)]
Report correct error when FormatMessage fails.

Previously, the original error code would be reported as having come
from FormatMessage.  Spotted by GCC [-Wformat-extra-args].

9 years agoUpdate documentation to refer to Git rather than Subversion.
Ben Harris [Sat, 1 Nov 2014 17:17:57 +0000 (17:17 +0000)]
Update documentation to refer to Git rather than Subversion.

9 years agoMove definition of SECURITY_WIN32 from makefiles into source.
Simon Tatham [Sat, 1 Nov 2014 14:44:16 +0000 (14:44 +0000)]
Move definition of SECURITY_WIN32 from makefiles into source.

This makes it easier for people to recompile the source in other
contexts or other makefiles.

9 years agoFix two double-frees in ssh2_load_userkey().
Simon Tatham [Tue, 28 Oct 2014 18:39:55 +0000 (18:39 +0000)]
Fix two double-frees in ssh2_load_userkey().

We should NULL out mac after freeing it, so that the cleanup code
doesn't try to free it again; also if the final key creation fails, we
should avoid freeing ret->comment when we're going to go to that same
cleanup code which will free 'comment' which contains the same pointer.

Thanks to Christopher Staite for pointing these out.