Commit Graph

9359 Commits

Author SHA1 Message Date
Damien Miller
48f54b9d12 adapt -portable to OpenSSL 1.1x API
Polyfill missing API with replacement functions extracted from LibreSSL
2018-09-13 12:13:50 +10:00
Damien Miller
86112951d6 forgot to stage these test files in commit d70d061 2018-09-13 12:12:42 +10:00
djm@openbsd.org
482d23bcac upstream: hold our collective noses and use the openssl-1.1.x API in
OpenSSH; feedback and ok tb@ jsing@ markus@

OpenBSD-Commit-ID: cacbcac87ce5da0d3ca7ef1b38a6f7fb349e4417
2018-09-13 12:12:33 +10:00
djm@openbsd.org
d70d061828 upstream: Include certs with multiple RSA signature variants in
test data Ensure that cert->signature_key is populated correctly

OpenBSD-Regress-ID: 56e68f70fe46cb3a193ca207385bdb301fd6603a
2018-09-12 16:51:36 +10:00
djm@openbsd.org
f803b26829 upstream: test revocation by explicit hash and by fingerprint
OpenBSD-Regress-ID: 079c18a9ab9663f4af419327c759fc1e2bc78fd8
2018-09-12 16:51:14 +10:00
djm@openbsd.org
2de78bc7da upstream: s/sshkey_demote/sshkey_from_private/g
OpenBSD-Regress-ID: 782bde7407d94a87aa8d1db7c23750e09d4443c4
2018-09-12 16:51:14 +10:00
Damien Miller
41c115a5ea delete the correct thing; kexfuzz binary 2018-09-12 16:50:01 +10:00
djm@openbsd.org
f0fcd7e650 upstream: fix edit mistake; spotted by jmc@
OpenBSD-Commit-ID: dd724e1c52c9d6084f4cd260ec7e1b2b138261c6
2018-09-12 16:49:21 +10:00
djm@openbsd.org
4cc259bac6 upstream: add SSH_ALLOWED_CA_SIGALGS - the default list of
signature algorithms that are allowed for CA signatures. Notably excludes
ssh-dsa.

ok markus@

OpenBSD-Commit-ID: 1628e4181dc8ab71909378eafe5d06159a22deb4
2018-09-12 16:49:21 +10:00
djm@openbsd.org
ba9e788315 upstream: add sshkey_check_cert_sigtype() that checks a
cert->signature_type against a supplied whitelist; ok markus

OpenBSD-Commit-ID: caadb8073292ed7a9535e5adc067d11d356d9302
2018-09-12 16:49:21 +10:00
djm@openbsd.org
a70fd4ad7b upstream: add cert->signature_type field and keep it in sync with
certificate signature wrt loading and certification operations; ok markus@

OpenBSD-Commit-ID: e8b8b9f76b66707a0cd926109c4383db8f664df3
2018-09-12 16:49:21 +10:00
djm@openbsd.org
357128ac48 upstream: Add "ssh -Q sig" to allow listing supported signature
algorithms ok markus@

OpenBSD-Commit-ID: 7a8c6eb6c249dc37823ba5081fce64876d10fe2b
2018-09-12 16:49:21 +10:00
djm@openbsd.org
9405c6214f upstream: allow key revocation by SHA256 hash and allow ssh-keygen
to create KRLs using SHA256/base64 key fingerprints; ok markus@

OpenBSD-Commit-ID: a0590fd34e7f1141f2873ab3acc57442560e6a94
2018-09-12 16:49:21 +10:00
djm@openbsd.org
50e2687ee0 upstream: log certificate fingerprint in authentication
success/failure message (previously we logged only key ID and CA key
fingerprint).

ok markus@

OpenBSD-Commit-ID: a8ef2d172b7f1ddbcce26d6434b2de6d94f6c05d
2018-09-12 16:48:18 +10:00
dtucker@openbsd.org
de37ca9094 upstream: Add FALLTHROUGH comments where appropriate. Patch from
jjelen at redhat via bz#2687.

OpenBSD-Commit-ID: c48eb457be697a19d6d2950c6d0879f3ccc851d3
2018-09-09 14:50:32 +10:00
djm@openbsd.org
247766cd31 upstream: ssh -MM requires confirmation for all operations that
change the multiplexing state, not just new sessions.

mention that confirmation is checked via ssh-askpass

OpenBSD-Commit-ID: 0f1b45551ebb9cc5c9a4fe54ad3b23ce90f1f5c2
2018-09-09 14:50:32 +10:00
mestre@openbsd.org
db8bb80e3a upstream: fix misplaced parenthesis inside if-clause. it's harmless
and the only issue is showing an unknown error (since it's not defined)
during fatal(), if it ever an error occurs inside that condition.

OK deraadt@ markus@ djm@

OpenBSD-Commit-ID: acb0a8e6936bfbe590504752d01d1d251a7101d8
2018-09-09 14:50:32 +10:00
mestre@openbsd.org
086cc614f5 upstream: fix build with DEBUG_PK enabled
OK dtucker@

OpenBSD-Commit-ID: ec1568cf27726e9638a0415481c20c406e7b441c
2018-09-09 14:50:32 +10:00
Darren Tucker
2678833013 Handle ngroups>_SC_NGROUPS_MAX.
Based on github pull request #99 from Darren Maffat at Oracle: Solaris'
getgrouplist considers _SC_NGROUPS_MAX more of a guideline and can return
a larger number of groups.  In this case, retry getgrouplist with a
larger array and defer allocating groups_byname.  ok djm@
2018-09-07 14:41:53 +10:00
Darren Tucker
039bf2a817 Initial len for the fmt=NULL case.
Patch from jjelen at redhat via bz#2687.  (OpenSSH never calls
setproctitle with a null format so len is always initialized).
2018-09-07 14:06:57 +10:00
Darren Tucker
ea9c06e11d Include stdlib.h.
Patch from jjelen at redhat via bz#2687.
2018-09-07 14:01:39 +10:00
Damien Miller
9617816dbe document some more regress control env variables
Specifically SKIP_UNIT, USE_VALGRING and LTESTS. Sort the list of
environment variables.

Based on patch from Jakub Jelen
2018-08-27 13:08:01 +10:00
Damien Miller
71508e06fa shorten temporary SSH_REGRESS_TMP path
Previous path was exceeding max socket length on at least one platform (OSX)
2018-08-23 15:41:42 +10:00
Damien Miller
26739cf5bd rebuild dependencies 2018-08-23 13:06:02 +10:00
Damien Miller
ff729025c7 fix path in distclean target
Patch from Jakub Jelen
2018-08-23 13:03:32 +10:00
djm@openbsd.org
7fef173c28 upstream: memleak introduced in r1.83; from Colin Watson
OpenBSD-Commit-ID: 5c019104c280cbd549a264a7217b67665e5732dc
2018-08-23 13:02:21 +10:00
schwarze@openbsd.org
b8ae02a289 upstream: AIX reports the CODESET as "ISO8859-1" in the POSIX locale.
Treating that as a safe encoding is OK because even when other systems return
that string for real ISO8859-1, it is still safe in the sense that it is
ASCII-compatible and stateless.

Issue reported by Val dot Baranov at duke dot edu.  Additional
information provided by Michael dot Felt at felt dot demon dot nl.
Tested by Michael Felt on AIX 6.1 and by Val Baranov on AIX 7.1.
Tweak and OK djm@.

OpenBSD-Commit-ID: 36f1210e0b229817d10eb490d6038f507b8256a7
2018-08-22 07:52:26 +10:00
Tim Rice
bc44ee088a modified: openbsd-compat/port-uw.c
remove obsolete and un-needed include
2018-08-21 08:57:24 -07:00
Damien Miller
829fc28a9c Missing unistd.h for regress/mkdtemp.c 2018-08-20 15:57:29 +10:00
Damien Miller
c8313e4923 update version numbers in anticipation of release 2018-08-17 05:45:36 +10:00
Corinna Vinschen
477b49a34b configure: work around GCC shortcoming on Cygwin
Cygwin's latest 7.x GCC allows to specify -mfunction-return=thunk
as well as -mindirect-branch=thunk on the command line, albeit
producing invalid code, leading to an error at link stage.

The check in configure.ac only checks if the option is present,
but not if it produces valid code.

This patch fixes it by special-casing Cygwin.  Another solution
may be to change these to linker checks.

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
2018-08-13 13:01:25 -07:00
Corinna Vinschen
b0917945ef cygwin: add missing stdarg.h include
Further header file standarization in Cygwin uncovered a lazy
indirect include in bsd-cygwin_util.c

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
2018-08-13 13:01:18 -07:00
djm@openbsd.org
c3903c38b0 upstream: revert compat.[ch] section of the following change. It
causes double-free under some circumstances.

--

date: 2018/07/31 03:07:24;  author: djm;  state: Exp;  lines: +33 -18;  commitid: f7g4UI8eeOXReTPh;
fix some memory leaks spotted by Coverity via Jakub Jelen in bz#2366
feedback and ok dtucker@

OpenBSD-Commit-ID: 1e77547f60fdb5e2ffe23e2e4733c54d8d2d1137
2018-08-13 12:42:13 +10:00
djm@openbsd.org
1b9dd4aa15 upstream: better diagnosics on alg list assembly errors; ok
deraadt@ markus@

OpenBSD-Commit-ID: 5a557e74b839daf13cc105924d2af06a1560faee
2018-08-13 12:42:13 +10:00
Damien Miller
e36a5f61b0 Some AIX fixes; report from Michael Felt 2018-08-11 18:08:45 -07:00
dtucker@openbsd.org
2f4766ceef upstream: The script that cooks up PuTTY format host keys does not
understand the new key format so convert back to old format to create the
PuTTY key and remove it once done.

OpenBSD-Regress-ID: 2a449a18846c3a144bc645135b551ba6177e38d3
2018-08-10 11:40:21 +10:00
djm@openbsd.org
e1b26ce504 upstream: improve
OpenBSD-Commit-ID: 40d839db0977b4e7ac8b647b16d5411d4faf2f60
2018-08-10 11:14:06 +10:00
djm@openbsd.org
7c712966a3 upstream: Describe pubkey format, prompted by bz#2853
While I'm here, describe and link to the remaining local PROTOCOL.*
docs that weren't already mentioned (PROTOCOL.key, PROTOCOL.krl and
PROTOCOL.mux)

OpenBSD-Commit-ID: 2a900f9b994ba4d53e7aeb467d44d75829fd1231
2018-08-10 11:14:06 +10:00
djm@openbsd.org
ef100a2c5a upstream: fix numbering
OpenBSD-Commit-ID: bc7a1764dff23fa4c5ff0e3379c9c4d5b63c9596
2018-08-10 11:14:06 +10:00
djm@openbsd.org
ed7bd5d93f upstream: Use new private key format by default. This format is
suported by OpenSSH >= 6.5 (released January 2014), so it should be supported
by most OpenSSH versions in active use.

It is possible to convert new-format private keys to the older
format using "ssh-keygen -f /path/key -pm PEM".

ok deraadt dtucker

OpenBSD-Commit-ID: e3bd4f2509a2103bfa2f710733426af3ad6d8ab8
2018-08-08 11:18:05 +10:00
djm@openbsd.org
967226a1bd upstream: invalidate dh->priv_key after freeing it in error path;
avoids unlikely double-free later. Reported by Viktor Dukhovni via
https://github.com/openssh/openssh-portable/pull/96 feedback jsing@ tb@

OpenBSD-Commit-ID: e317eb17c3e05500ae851f279ef6486f0457c805
2018-08-06 11:07:17 +10:00
djm@openbsd.org
74287f5df9 upstream: delay bailout for invalid authentic
=?UTF-8?q?ating=20user=20until=20after=20the=20packet=20containing=20the?=
=?UTF-8?q?=20request=20has=20been=20fully=20parsed.=20Reported=20by=20Dar?=
=?UTF-8?q?iusz=20Tytko=20and=20Micha=C5=82=20Sajdak;=20ok=20deraadt?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

OpenBSD-Commit-ID: b4891882fbe413f230fe8ac8a37349b03bd0b70d
2018-07-31 13:13:26 +10:00
djm@openbsd.org
1a66079c06 upstream: fix some memory leaks spotted by Coverity via Jakub Jelen
in bz#2366 feedback and ok dtucker@

OpenBSD-Commit-ID: 8402bbae67d578bedbadb0ce68ff7c5a136ef563
2018-07-31 13:13:26 +10:00
Damien Miller
87f08be054 Remove support for S/Key
Most people will 1) be using modern multi-factor authentication methods
like TOTP/OATH etc and 2) be getting support for multi-factor
authentication via PAM or BSD Auth.
2018-07-31 12:59:30 +10:00
markus@openbsd.org
5d14019ba2 upstream: avoid expensive channel_open_message() calls; ok djm@
OpenBSD-Commit-ID: aea3b5512ad681cd8710367d743e8a753d4425d9
2018-07-31 12:20:13 +10:00
dtucker@openbsd.org
e655ee04a3 upstream: Now that ssh can't be setuid, remove the
original_real_uid and original_effective_uid globals and replace with calls
to plain getuid(). ok djm@

OpenBSD-Commit-ID: 92561c0cd418d34e6841e20ba09160583e27b68c
2018-07-31 12:20:13 +10:00
dtucker@openbsd.org
73ddb25bae upstream: Remove uid checks from low port binds. Now that ssh
cannot be setuid and sshd always has privsep on, we can remove the uid checks
for low port binds and just let the system do the check. We leave a sanity
check for the !privsep case so long as the code is stil there.  with & ok
djm@

OpenBSD-Commit-ID: 9535cfdbd1cd54486fdbedfaee44ce4367ec7ca0
2018-07-31 12:18:49 +10:00
dtucker@openbsd.org
c12033e102 upstream: ssh(1) no longer supports being setuid root. Remove reference
to crc32 which went with protocol 1.  Pointed out by deraadt@.

OpenBSD-Commit-ID: f8763c25fd96ed91dd1abdab5667fd2e27e377b6
2018-07-27 15:09:59 +10:00
Damien Miller
4492e2ec4e correct snprintf truncation check in closefrom()
Truncation cannot happen unless the system has set PATH_MAX to some
nonsensically low value.

bz#2862, patch from Daniel Le
2018-07-27 14:20:09 +10:00
Darren Tucker
149cab325a Include stdarg.h in mkdtemp for va_list. 2018-07-27 13:46:06 +10:00