Commit Graph

1154 Commits

Author SHA1 Message Date
Matt Johnston
3ee9656250 merge fixes from PuTTY import.c
toint() from misc.c

(revids are from hggit conversion)

changeset:   4620:60a336a6c85c
user:        Simon Tatham <anakin@pobox.com>
date:        Thu Feb 25 20:26:33 2016 +0000
files:       import.c
description:
Fix potential segfaults in reading OpenSSH's ASN.1 key format.

The length coming back from ber_read_id_len might have overflowed, so
treat it as potentially negative. Also, while I'm here, accumulate it
inside ber_read_id_len as an unsigned, so as to avoid undefined
behaviour on integer overflow, and toint() it before return.

Thanks to Hanno Böck for spotting this, with the aid of AFL.

(cherry picked from commit 5b7833cd474a24ec098654dcba8cb9509f3bf2c1)

Conflicts:
	import.c

(cherry-picker's note: resolving the conflict involved removing an
entire section of the original commit which fixed ECDSA code not
present on this branch)


changeset:   4619:9c6c638d98d8
user:        Simon Tatham <anakin@pobox.com>
date:        Sun Jul 14 10:45:54 2013 +0000
files:       import.c ssh.c sshdss.c sshpubk.c sshrsa.c
description:
Tighten up a lot of casts from unsigned to int which are read by one
of the GET_32BIT macros and then used as length fields. Missing bounds
checks against zero have been added, and also I've introduced a helper
function toint() which casts from unsigned to int in such a way as to
avoid C undefined behaviour, since I'm not sure I trust compilers any
more to do the obviously sensible thing.

[originally from svn r9918]


changeset:   4618:3957829f24d3
user:        Simon Tatham <anakin@pobox.com>
date:        Mon Jul 08 22:36:04 2013 +0000
files:       import.c sshdss.c sshrsa.c
description:
Add an assortment of extra safety checks.

[originally from svn r9896]


changeset:   4617:2cddee0bce12
user:        Jacob Nevins <jacobn@chiark.greenend.org.uk>
date:        Wed Dec 07 00:24:45 2005 +0000
files:       import.c
description:
Institutional failure to memset() things pointed at rather than pointers.
Things should now be zeroed and memory not leaked. Spotted by Brant Thomsen.

[originally from svn r6476]


changeset:   4616:24ac78a9c71d
user:        Simon Tatham <anakin@pobox.com>
date:        Wed Feb 11 13:58:27 2004 +0000
files:       import.c
description:
Jacob's last-minute testing found a couple of trivial bugs in
import.c, and my attempts to reproduce them in cmdgen found another
one there :-)

[originally from svn r3847]


changeset:   4615:088d39a73db0
user:        Simon Tatham <anakin@pobox.com>
date:        Thu Jan 22 18:52:49 2004 +0000
files:       import.c
description:
Placate some gcc warnings.

[originally from svn r3761]


changeset:   4614:e4288bad4d93
parent:      1758:108b8924593d
user:        Simon Tatham <anakin@pobox.com>
date:        Fri Oct 03 21:21:23 2003 +0000
files:       import.c
description:
My ASN.1 decoder returned wrong IDs for anything above 0x1E! Good
job it's never had to yet. Ahem.

[originally from svn r3479]
2016-07-12 23:00:01 +08:00
Matt Johnston
c0f63ee100 additional length checks 2016-07-11 23:34:18 +08:00
Matt Johnston
8fd720c3e3 Improve exit message formatting 2016-07-11 23:09:33 +08:00
Matt Johnston
4f5d0756c2 improve algorithm list parsing 2016-07-11 22:40:38 +08:00
Matt Johnston
64e6e3aca9 better TRACE of failed remote ident 2016-07-11 21:51:25 +08:00
Matt Johnston
8c53621c24 update for 2016.73 2016-03-18 22:44:36 +08:00
Matt Johnston
514baf3bf7 Fix whitespace missed in merge 2016-03-18 20:43:22 +08:00
Matt Johnston
420151dbd9 move m_burn and function attributes to dbhelpers
use m_burn for libtomcrypt zeromem() too
2016-03-17 23:21:33 +08:00
Matt Johnston
156b28c771 Fix missing paths from m_burn commit 2016-03-17 06:40:31 +08:00
Matt Johnston
ad801851a2 use m_burn for mp_clear 2016-03-17 00:06:26 +08:00
Matt Johnston
b647b753e0 Use memset_s or explicit_bzero 2016-03-16 23:39:39 +08:00
Matt Johnston
48b855c581 add CVE 2016-03-16 23:04:55 +08:00
Matt Johnston
c830d30553 merge 2016-03-16 22:53:27 +08:00
Francois Perrad
0650182289 add the idiomatic do/while(0) in the macro SCREWUP 2016-03-16 22:41:20 +08:00
Francois Perrad
3e20c442de fix empty C prototypes 2016-03-16 22:41:20 +08:00
Francois Perrad
af87369cb3 add static in function definition
like in function declaration
2016-03-16 22:41:19 +08:00
Francois Perrad
edea73b1f8 add parentheses to macro 2016-03-16 22:41:19 +08:00
Francois Perrad
893d7be5bf const variables 2016-03-16 22:41:19 +08:00
Francois Perrad
c5b77e1b49 explicitly initialization of static variables 2016-03-16 22:41:19 +08:00
Francois Perrad
a5e5bab74b Suspicious use of ; 2016-03-16 22:41:19 +08:00
Francois Perrad
8f96b8908e rename loop variable
2 nested loops with the same variable 'i',
line 219 and line 309
2016-03-16 22:41:19 +08:00
Francois Perrad
f3a6dd139c Suspicious use of & 2016-03-16 22:41:19 +08:00
Francois Perrad
1dba0d4830 add comment FALLTHROUGH which recognize by many lint tools 2016-03-16 22:41:19 +08:00
Francois Perrad
da85400e57 put default in switch/case 2016-03-16 22:41:19 +08:00
Francois Perrad
7f38caefd0 remove unreachable code 2016-03-16 22:41:19 +08:00
Francois Perrad
937594c130 use #ifdef like everywhere 2016-03-16 22:41:05 +08:00
Matt Johnston
3e7672edca merge 2016-03-15 23:23:31 +08:00
Matt Johnston
098aba47c3 assertion for case that shouldn't happen 2016-03-15 23:20:01 +08:00
Matt Johnston
c67fc5693a m_close() rather than close() 2016-03-15 23:03:59 +08:00
Matt Johnston
6b5c6af613 ignore return value from fcntl() 2016-03-15 23:03:43 +08:00
Matt Johnston
3ccc36b3b7 Fix truncated type for getc() at confirmation prompt 2016-03-15 23:03:31 +08:00
Matt Johnston
e7828bb911 cast return type to enum 2016-03-15 22:40:15 +08:00
Matt Johnston
e255f0590b remove unused loginrec_set_addr() 2016-03-15 22:04:13 +08:00
Matt Johnston
4615631d83 update CHANGES 2016-03-15 22:03:23 +08:00
Matt Johnston
e708f9542f Merge pull request #23 from Chocobo1/travis_fix
TravisCI: re-enable MULTI=1 & NOWRITEV=1 builds on OSX
2016-03-15 21:55:11 +08:00
Matt Johnston
6bfbcdbfdb Merge branch 'fperrad-20151231_indent' 2016-03-15 21:41:22 +08:00
Matt Johnston
645b254173 Merge branch '20151231_indent' of https://github.com/fperrad/dropbear into fperrad-20151231_indent 2016-03-15 21:41:06 +08:00
Matt Johnston
fdc61f3ab2 Get rid of group15, move group16 to sha512.
New groups are disabled by default pending
draft-ietf-curdle-ssh-kex-sha2-02 being finalised
2016-03-12 16:21:13 +08:00
Matt Johnston
a991d3b56b merge github master 2016-03-10 21:37:35 +08:00
Matt Johnston
26a1a0a3bc allow specifying dropbearmulti command as an argument 2016-03-10 21:35:23 +08:00
Matt Johnston
73bc3a9853 merge 2016.72 2016-03-10 20:57:47 +08:00
Matt Johnston
9cb325ee6f Added signature for changeset fd1981f41c62 2016-03-10 20:50:31 +08:00
Matt Johnston
9e1d038a65 Added tag DROPBEAR_2016.72 for changeset 78b12b6549be 2016-03-10 20:50:24 +08:00
Matt Johnston
7e5fe1d813 debian changelog 2016-03-09 22:54:51 +08:00
Matt Johnston
97dff151ae 2016.72 2016-03-09 22:54:15 +08:00
Matt Johnston
18681875e3 Validate xauth input 2016-03-09 22:45:40 +08:00
Chocobo1
9b0a2714f0 TravisCI: re-enable MULTI=1 & NOWRITEV=1 builds on OSX, fixes d416a9b 2016-01-21 00:21:39 +08:00
Matt Johnston
a84ce21aec Merge pull request #22 from Chocobo1/travis
TravisCI: Improvements
2016-01-20 21:36:58 +08:00
Matt Johnston
1fc1559d15 Merge pull request #21 from Chocobo1/fix
Fix warnings
2016-01-20 21:24:36 +08:00
Matt Johnston
de70b02c2f Don't fail if can't get the username 2016-01-19 00:34:37 +08:00