Commit Graph

8463 Commits

Author SHA1 Message Date
markus@openbsd.org
ec165c392c upstream commit
Unregister the KEXINIT handler after message has been
received. Otherwise an unauthenticated peer can repeat the KEXINIT and cause
allocation of up to 128MB -- until the connection is closed. Reported by
shilei-c at 360.cn

Upstream-ID: 43649ae12a27ef94290db16d1a98294588b75c05
2016-10-13 18:55:25 +11:00
Darren Tucker
29d4031939 Import rev 1.24 from OpenBSD.
revision 1.24
date: 2013/11/24 23:51:29;  author: deraadt;  state: Exp;  lines: +4 -4;
most obvious unsigned char casts for ctype
ok jca krw ingo
2016-10-13 04:07:20 +11:00
Darren Tucker
12069e5622 Import rev 1.23 from OpenBSD. Fixes bz#2619.
revision 1.23
date: 2010/05/14 13:30:34;  author: millert;  state: Exp;  lines: +41 -39;
Defer installing signal handlers until echo is disabled so that we
get suspended normally when not the foreground process.  Fix potential
infinite loop when restoring terminal settings if process is in the
background when restore occurs.  OK miod@
2016-10-13 04:04:44 +11:00
Darren Tucker
7508d83eff If we don't have TCSASOFT, define it to zero.
This makes it a no-op when we use it below, which allows us to re-sync
those lines with the upstream and make future updates easier.
2016-10-13 03:53:51 +11:00
jmc@openbsd.org
aae4dbd4c0 upstream commit
tidy up the formatting in this file. more specifically,
replace .Dq, which looks appalling, with .Cm, where appropriate;

Upstream-ID: ff8e90aa0343d9bb56f40a535e148607973cc738
2016-10-10 14:27:12 +11:00
djm@openbsd.org
a571dbcc7b upstream commit
add a comment about implicitly-expected checks to
sshkey_ec_validate_public()

Upstream-ID: 74a7f71c28f7c13a50f89fc78e7863b9cd61713f
2016-10-06 06:00:43 +11:00
djm@openbsd.org
2f78a2a698 upstream commit
fix some -Wpointer-sign warnings in the new mux proxy; ok
markus@

Upstream-ID: b1ba7b3769fbc6b7f526792a215b0197f5e55dfd
2016-10-01 07:07:58 +10:00
bluhm@openbsd.org
ca71c36645 upstream commit
Add a makefile rule to create the ssh library when
regress needs it.  This allows to run the ssh regression tests without doing
a "make build" before. Discussed with dtucker@ and djm@; OK djm@

Upstream-Regress-ID: ce489bd53afcd471225a125b4b94565d4717c025
2016-10-01 06:44:43 +10:00
bluhm@openbsd.org
ce44c970f9 upstream commit
Allow to run ssh regression tests as root.  If the user
is already root, the test should not expect that SUDO is set.  If ssh needs
another user, use sudo or doas to switch from root if necessary. OK dtucker@

Upstream-Regress-ID: b464e55185ac4303529e3e6927db41683aaeace2
2016-10-01 06:44:00 +10:00
markus@openbsd.org
8d05784785 upstream commit
ssh proxy mux mode (-O proxy; idea from Simon Tatham): - mux
client speaks the ssh-packet protocol directly over unix-domain socket. - mux
server acts as a proxy, translates channel IDs and relays to the server. - no
filedescriptor passing necessary. - combined with unix-domain forwarding it's
even possible to run mux client   and server on different machines. feedback
& ok djm@

Upstream-ID: 666a2fb79f58e5c50e246265fb2b9251e505c25b
2016-10-01 02:45:10 +10:00
djm@openbsd.org
b7689155f3 upstream commit
put back some pre-auth zlib bits that I shouldn't have
removed - they are still used by the client. Spotted by naddy@

Upstream-ID: 80919468056031037d56a1f5b261c164a6f90dc2
2016-09-29 08:18:39 +10:00
djm@openbsd.org
4577adead6 upstream commit
restore pre-auth compression support in the client -- the
previous commit was intended to remove it from the server only.

remove a few server-side pre-auth compression bits that escaped

adjust wording of Compression directive in sshd_config(5)

pointed out by naddy@ ok markus@

Upstream-ID: d23696ed72a228dacd4839dd9f2dec424ba2016b
2016-09-29 06:54:50 +10:00
jmc@openbsd.org
80d1c963b4 upstream commit
use a separate TOKENS section, as we've done for
sshd_config(5); help/ok djm

Upstream-ID: 640e32b5e4838e4363738cdec955084b3579481d
2016-09-29 06:54:50 +10:00
Damien Miller
1cfd5c06ef Remove portability support for mmap
We no longer need to wrap/replace mmap for portability now that
pre-auth compression has been removed from OpenSSH.
2016-09-29 03:19:23 +10:00
djm@openbsd.org
0082fba4ef upstream commit
Remove support for pre-authentication compression. Doing
compression early in the protocol probably seemed reasonable in the 1990s,
but today it's clearly a bad idea in terms of both cryptography (cf. multiple
compression oracle attacks in TLS) and attack surface.

Moreover, to support it across privilege-separation zlib needed
the assistance of a complex shared-memory manager that made the
required attack surface considerably larger.

Prompted by Guido Vranken pointing out a compiler-elided security
check in the shared memory manager found by Stack
(http://css.csail.mit.edu/stack/); ok deraadt@ markus@

NB. pre-auth authentication has been disabled by default in sshd
for >10 years.

Upstream-ID: 32af9771788d45a0779693b41d06ec199d849caf
2016-09-29 03:11:32 +10:00
djm@openbsd.org
27c3a9c2ae upstream commit
Avoid a theoretical signed integer overflow should
BN_num_bytes() ever violate its manpage and return a negative value. Improve
order of tests to avoid confusing increasingly pedantic compilers.

Reported by Guido Vranken from stack (css.csail.mit.edu/stack)
unstable optimisation analyser output.  ok deraadt@

Upstream-ID: f8508c830c86d8f36c113985e52bf8eedae23505
2016-09-29 03:09:50 +10:00
Damien Miller
8663e51c80 fix mdoc2man.awk formatting for top-level lists
Reported by Glenn Golden
Diagnosis and fix from Ingo Schwarze
2016-09-28 07:40:33 +10:00
djm@openbsd.org
b97739dc21 upstream commit
missing bit from previous commit

Upstream-ID: 438d5ed6338b28b46e822eb13eee448aca31df37
2016-09-24 05:39:37 +10:00
jmc@openbsd.org
de6a175a99 upstream commit
organise the token stuff into a separate section; ok
markus for an earlier version of the diff ok/tweaks djm

Upstream-ID: 81a6daa506a4a5af985fce7cf9e59699156527c8
2016-09-24 05:39:37 +10:00
djm@openbsd.org
16277fc45f upstream commit
mention curve25519-sha256 KEX

Upstream-ID: 33ae1f433ce4795ffa6203761fbdf86e0d7ffbaf
2016-09-24 05:39:37 +10:00
djm@openbsd.org
0493766d56 upstream commit
support plain curve25519-sha256 KEX algorithm now that it
is approaching standardisation (same algorithm is currently supported as
curve25519-sha256@libssh.org)

Upstream-ID: 5e2b6db2e72667048cf426da43c0ee3fc777baa2
2016-09-24 05:39:37 +10:00
dtucker@openbsd.org
f31c654b30 upstream commit
If ssh receives a PACKET_DISCONNECT during userauth it
will cause ssh_dispatch_run(DISPATCH_BLOCK, ...) to return without the
session being authenticated.  Check for this and exit if necessary.  ok djm@

Upstream-ID: b3afe126c0839d2eae6cddd41ff2ba317eda0903
2016-09-24 05:38:04 +10:00
djm@openbsd.org
1622649b7a upstream commit
correctly return errors from kex_send_ext_info(). Fix from
Sami Farin via https://github.com/openssh/openssh-portable/pull/50

Upstream-ID: c85999af28aaecbf92cfa2283381df81e839b42c
2016-09-22 05:59:35 +10:00
djm@openbsd.org
f83a0cfe16 upstream commit
cast uint64_t for printf

Upstream-ID: 76d23e89419ccbd2320f92792a6d878211666ac1
2016-09-22 03:45:03 +10:00
djm@openbsd.org
5f63ab474f upstream commit
disable tests for affirmative negated match after backout of
match change

Upstream-Regress-ID: acebb8e5042f03d66d86a50405c46c4de0badcfd
2016-09-22 03:15:25 +10:00
djm@openbsd.org
a5ad3a9db5 upstream commit
Revert two recent changes to negated address matching. The
new behaviour offers unintuitive surprises. We'll find a better way to deal
with single negated matches.

match.c 1.31:
> fix matching for pattern lists that contain a single negated match,
> e.g. "Host !example"
>
> report and patch from Robin Becker. bz#1918 ok dtucker@

addrmatch.c 1.11:
> fix negated address matching where the address list consists of a
> single negated match, e.g. "Match addr !192.20.0.1"
>
> Report and patch from Jakub Jelen. bz#2397 ok dtucker@

Upstream-ID: ec96c770f0f5b9a54e5e72fda25387545e9c80c6
2016-09-22 03:14:59 +10:00
djm@openbsd.org
119b7a2ca0 upstream commit
test all the AuthorizedPrincipalsCommand % expansions

Upstream-Regress-ID: 0a79a84dfaa59f958e46b474c3db780b454d30e3
2016-09-21 11:43:57 +10:00
djm@openbsd.org
bfa9d969ab upstream commit
add a way for principals command to get see key ID and serial
too

Upstream-ID: 0d30978bdcf7e8eaeee4eea1b030eb2eb1823fcb
2016-09-21 11:41:22 +10:00
djm@openbsd.org
920585b826 upstream commit
add a note on kexfuzz' limitations

Upstream-Regress-ID: 03804d4a0dbc5163e1a285a4c8cc0a76a4e864ec
2016-09-21 11:07:47 +10:00
djm@openbsd.org
0445ff1840 upstream commit
fix for newer modp DH groups
(diffie-hellman-group14-sha256 etc)

Upstream-Regress-ID: fe942c669959462b507516ae1634fde0725f1c68
2016-09-21 11:07:47 +10:00
markus@openbsd.org
28652bca29 upstream commit
move inbound NEWKEYS handling to kex layer; otherwise
early NEWKEYS causes NULL deref; found by Robert Swiecki/honggfuzz; fixed
with & ok djm@

Upstream-ID: 9a68b882892e9f51dc7bfa9f5a423858af358b2f
2016-09-21 11:03:55 +10:00
natano@openbsd.org
492710894a upstream commit
Replace two more arc4random() loops with
arc4random_buf().

tweaks and ok dtucker
ok deraadt

Upstream-ID: 738d3229130ccc7eac975c190276ca6fcf0208e4
2016-09-21 11:03:55 +10:00
tedu@openbsd.org
1036356324 upstream commit
replace two arc4random loops with arc4random_buf ok
deraadt natano

Upstream-ID: e18ede972d1737df54b49f011fa4f3917a403f48
2016-09-21 11:03:55 +10:00
djm@openbsd.org
00df97ff68 upstream commit
take fingerprint of correct key for
AuthorizedPrincipalsCommand

Upstream-ID: 553581a549cd6a3e73ce9f57559a325cc2cb1f38
2016-09-15 06:13:36 +10:00
djm@openbsd.org
e7907c1cb9 upstream commit
add %-escapes to AuthorizedPrincipalsCommand to match those
supported for AuthorizedKeysCommand (key, key type, fingerprint, etc) and a
few more to provide access to the certificate's CA key; 'looks ok' dtucker@

Upstream-ID: 6b00fd446dbebe67f4e4e146d2e492d650ae04eb
2016-09-14 15:43:23 +10:00
dtucker@openbsd.org
2b939c272a upstream commit
Improve test coverage of ssh-keygen -T a bit.

Upstream-Regress-ID: 8851668c721bcc2b400600cfc5a87644cc024e72
2016-09-14 11:34:59 +10:00
dtucker@openbsd.org
44d82fc83b upstream commit
Add testcase for ssh-keygen -j, -J and -K options for
moduli screening. Does not currently test generation as that is extremely
slow.

Upstream-Regress-ID: 9de6ce801377ed3ce0a63a1413f1cd5fd3c2d062
2016-09-14 10:57:21 +10:00
djm@openbsd.org
44e5f756d2 upstream commit
add tests for addr_match_list()

Upstream-Regress-ID: fae2d1fef84687ece584738a924c7bf969616c8e
2016-09-14 10:55:22 +10:00
djm@openbsd.org
445e218878 upstream commit
handle certs in rsa_hash_alg_from_ident(), saving an
unnecessary special case elsewhere.

Upstream-ID: 901cb081c59d6d2698b57901c427f3f6dc7397d4
2016-09-14 10:51:24 +10:00
djm@openbsd.org
130f5df4fa upstream commit
list all supported signature algorithms in the
server-sig-algs Reported by mb AT smartftp.com in bz#2547 and (independantly)
Ron Frederick; ok markus@

Upstream-ID: ddf702d721f54646b11ef2cee6d916666cb685cd
2016-09-13 09:33:24 +10:00
Darren Tucker
8f750ccfc0 Remove no-op brackets to resync with upstream. 2016-09-12 14:43:58 +10:00
Darren Tucker
7050896e73 Resync ssh-keygen -W error message with upstream. 2016-09-12 13:57:28 +10:00
Darren Tucker
43cceff82c Move ssh-keygen -W handling code to match upstream 2016-09-12 13:57:07 +10:00
Darren Tucker
af48d54136 Move ssh-keygen -T handling code to match upstream. 2016-09-12 13:52:17 +10:00
Darren Tucker
d8c3cfbb01 Move -M handling code to match upstream. 2016-09-12 13:51:04 +10:00
dtucker@openbsd.org
7b63cf6dbb upstream commit
Spaces->tabs.

Upstream-ID: f4829dfc3f36318273f6082b379ac562eead70b7
2016-09-12 13:49:24 +10:00
dtucker@openbsd.org
11e5e64453 upstream commit
Style whitespace fix.  Also happens to remove a no-op
diff with portable.

Upstream-ID: 45d90f9a62ad56340913a433a9453eb30ceb8bf3
2016-09-12 13:47:51 +10:00
deraadt@openbsd.org
9136ec134c upstream commit
Add MAXIMUM(), MINIMUM(), and ROUNDUP() to misc.h, then
use those definitions rather than pulling <sys/param.h> and unknown namespace
pollution. ok djm markus dtucker

Upstream-ID: 712cafa816c9f012a61628b66b9fbd5687223fb8
2016-09-12 13:46:29 +10:00
jmc@openbsd.org
f219fc8f03 upstream commit
sort; from matthew martin

Upstream-ID: 73cec7f7ecc82d37a4adffad7745e4684de67ce7
2016-09-12 13:39:30 +10:00
markus@openbsd.org
06ce56b05d upstream commit
ssh_set_newkeys: print correct block counters on
rekeying; ok djm@

Upstream-ID: 32bb7a9cb9919ff5bab28d50ecef3a2b2045dd1e
2016-09-12 13:39:30 +10:00