]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
5 years agoDeny (non-fatal) ipc in preauth privsep child. V_8_1 anongit/V_8_1 github-selfhosted/V_8_1 github/V_8_1
Jeremy Drake [Sat, 12 Oct 2019 01:31:05 +0000 (18:31 -0700)] 
Deny (non-fatal) ipc in preauth privsep child.

As noted in openssh/openssh-portable#149, i386 does not have have
_NR_shmget etc.  Instead, it has a single ipc syscall (see man 2 ipc,
https://linux.die.net/man/2/ipc).  Add this syscall, if present, to the
list of syscalls that seccomp will deny non-fatally.

5 years agoseccomp: Allow clock_gettime64() in sandbox.
Khem Raj [Wed, 8 Jan 2020 00:26:45 +0000 (16:26 -0800)] 
seccomp: Allow clock_gettime64() in sandbox.

This helps sshd accept connections on mips platforms with
upcoming glibc ( 2.31 )

5 years agoAllow clock_nanosleep_time64 in seccomp sandbox.
Darren Tucker [Mon, 16 Dec 2019 02:55:56 +0000 (13:55 +1100)] 
Allow clock_nanosleep_time64 in seccomp sandbox.

Needed on Linux ARM.  bz#3100, patch from jjelen@redhat.com.

5 years agoRemove duplicate __NR_clock_nanosleep
Darren Tucker [Wed, 13 Nov 2019 12:27:31 +0000 (23:27 +1100)] 
Remove duplicate __NR_clock_nanosleep

5 years agoseccomp: Allow clock_nanosleep() in sandbox.
Darren Tucker [Wed, 13 Nov 2019 12:19:35 +0000 (23:19 +1100)] 
seccomp: Allow clock_nanosleep() in sandbox.

seccomp: Allow clock_nanosleep() to make OpenSSH working with latest
glibc.  Patch from Jakub Jelen <jjelen@redhat.com> via bz #3093.

5 years agoFix ifdef typo for declaration of memmem. 158/head
Darren Tucker [Wed, 9 Oct 2019 22:42:03 +0000 (09:42 +1100)] 
Fix ifdef typo for declaration of memmem.

Fixes build on IRIX.  bz#3081.

5 years agoprepare for 8.1 release V_8_1_P1
Damien Miller [Wed, 9 Oct 2019 00:31:03 +0000 (11:31 +1100)] 
prepare for 8.1 release

5 years agoupstream: openssh-8.1
djm@openbsd.org [Wed, 9 Oct 2019 00:04:57 +0000 (00:04 +0000)] 
upstream: openssh-8.1

OpenBSD-Commit-ID: 3356bb34e2aa287f0e6d6773c9ae659dc680147d

5 years agoupstream: fix an unreachable integer overflow similar to the XMSS
djm@openbsd.org [Wed, 9 Oct 2019 00:04:42 +0000 (00:04 +0000)] 
upstream: fix an unreachable integer overflow similar to the XMSS

case, and some other NULL dereferences found by fuzzing.

fix with and ok markus@

OpenBSD-Commit-ID: 0f81adbb95ef887ce586953e1cb225fa45c7a47b

5 years agoupstream: fix integer overflow in XMSS private key parsing.
djm@openbsd.org [Wed, 9 Oct 2019 00:02:57 +0000 (00:02 +0000)] 
upstream: fix integer overflow in XMSS private key parsing.

Reported by Adam Zabrocki via SecuriTeam's SSH program.

Note that this code is experimental and not compiled by default.

ok markus@

OpenBSD-Commit-ID: cd0361896d15e8a1bac495ac583ff065ffca2be1

5 years agoupstream: Correct type for end-of-list sentinel; fixes initializer
dtucker@openbsd.org [Tue, 8 Oct 2019 22:40:39 +0000 (22:40 +0000)] 
upstream: Correct type for end-of-list sentinel; fixes initializer

warnings on some platforms.  ok deraadt.

OpenBSD-Commit-ID: a990dbc2dac25bdfa07e79321349c73fd991efa2

5 years agoupstream: reversed test yielded incorrect debug message
djm@openbsd.org [Mon, 7 Oct 2019 23:10:38 +0000 (23:10 +0000)] 
upstream: reversed test yielded incorrect debug message

OpenBSD-Commit-ID: 78bb512d04cfc238adb2c5b7504ac93eecf523b3

5 years agodepend
Damien Miller [Tue, 8 Oct 2019 06:05:57 +0000 (17:05 +1100)] 
depend

5 years agoMake MAKE_CLONE no-op macro more correct.
Darren Tucker [Tue, 8 Oct 2019 22:36:06 +0000 (09:36 +1100)] 
Make MAKE_CLONE no-op macro more correct.

Similar to the previous change to DEF_WEAK, some compilers don't like
the empty statement, so convert into a no-op function prototype.

5 years agowrap stdint.h include in HAVE_STDINT_H
Damien Miller [Tue, 8 Oct 2019 22:06:35 +0000 (09:06 +1100)] 
wrap stdint.h include in HAVE_STDINT_H

make the indenting a little more consistent too..

Fixes Solaris 2.6; reported by Tom G. Christensen

5 years agoavoid "return (value)" in void-declared function
Damien Miller [Tue, 8 Oct 2019 04:32:02 +0000 (15:32 +1100)] 
avoid "return (value)" in void-declared function

spotted by Tim Rice; ok dtucker

5 years agoMake DEF_WEAK more likely to be correct.
Darren Tucker [Tue, 8 Oct 2019 03:44:50 +0000 (14:44 +1100)] 
Make DEF_WEAK more likely to be correct.

Completely nop-ing out DEF_WEAK leaves an empty statemment which some
compilers don't like.  Replace with a no-op function template.  ok djm@

5 years agoupstream: Instead of running sed over the whole log to remove CRs,
dtucker@openbsd.org [Sun, 6 Oct 2019 11:49:50 +0000 (11:49 +0000)] 
upstream: Instead of running sed over the whole log to remove CRs,

remove them only where it's needed (and confuses test(1) on at least OS X in
portable).

OpenBSD-Regress-ID: a6ab9b4bd1d33770feaf01b2dfb96f9e4189d2d0

5 years agoEnable specific ioctl call for EP11 crypto card (s390)
Eduardo Barretto [Tue, 9 May 2017 16:33:30 +0000 (13:33 -0300)] 
Enable specific ioctl call for EP11 crypto card (s390)

The EP11 crypto card needs to make an ioctl call, which receives an
specific argument. This crypto card is for s390 only.

Signed-off-by: Eduardo Barretto <ebarretto@linux.vnet.ibm.com>
5 years agoupstream: fix memory leak in error path; bz#3074 patch from
djm@openbsd.org [Fri, 4 Oct 2019 04:31:59 +0000 (04:31 +0000)] 
upstream: fix memory leak in error path; bz#3074 patch from

krishnaiah.bommu@intel.com, ok dtucker

OpenBSD-Commit-ID: d031853f3ecf47b35a0669588f4d9d8e3b307b3c

5 years agoupstream: space
djm@openbsd.org [Fri, 4 Oct 2019 04:13:39 +0000 (04:13 +0000)] 
upstream: space

OpenBSD-Commit-ID: 350648bcf00a2454e7ef998b7d88e42552b348ac

5 years agoupstream: more sshsig regress tests: check key revocation, the
djm@openbsd.org [Fri, 4 Oct 2019 03:39:19 +0000 (03:39 +0000)] 
upstream: more sshsig regress tests: check key revocation, the

check-novalidate signature test mode and signing keys in ssh-agent.

From Sebastian Kinne (slightly tweaked)

OpenBSD-Regress-ID: b39566f5cec70140674658cdcedf38752a52e2e2

5 years agoupstream: Check for gmtime failure in moduli generation. Based on
dtucker@openbsd.org [Fri, 4 Oct 2019 03:26:58 +0000 (03:26 +0000)] 
upstream: Check for gmtime failure in moduli generation. Based on

patch from krishnaiah.bommu@intel.com, ok djm@

OpenBSD-Commit-ID: 4c6a4cde0022188ac83737de08da0e875704eeaa

5 years agoupstream: use a more common options order in SYNOPSIS and sync
jmc@openbsd.org [Thu, 3 Oct 2019 17:07:50 +0000 (17:07 +0000)] 
upstream: use a more common options order in SYNOPSIS and sync

usage(); while here, no need for Bk/Ek;

ok dtucker

OpenBSD-Commit-ID: 38715c3f10b166f599a2283eb7bc14860211bb90

5 years agoupstream: thinko in previous; spotted by Mantas
djm@openbsd.org [Wed, 2 Oct 2019 09:50:50 +0000 (09:50 +0000)] 
upstream: thinko in previous; spotted by Mantas

=?UTF-8?q?=20Mikul=C4=97nas?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

OpenBSD-Commit-ID: ffa3f5a45e09752fc47d9041e2203ee2ec15b24d

5 years agoupstream: make signature format match PROTOCO
djm@openbsd.org [Wed, 2 Oct 2019 08:07:13 +0000 (08:07 +0000)] 
upstream: make signature format match PROTOCO

=?UTF-8?q?=20as=20a=20string,=20not=20raw=20bytes.=20Spotted=20by=20Manta?=
=?UTF-8?q?s=20Mikul=C4=97nas?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

OpenBSD-Commit-ID: 80fcc6d52893f80c6de2bedd65353cebfebcfa8f

5 years agoupstream: ban empty namespace strings for s
djm@openbsd.org [Wed, 2 Oct 2019 08:05:50 +0000 (08:05 +0000)] 
upstream: ban empty namespace strings for s

=?UTF-8?q?shsig;=20spotted=20by=20Mantas=20Mikul=C4=97nas?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

OpenBSD-Commit-ID: 7c5bcf40bed8f4e826230176f4aa353c52aeb698

5 years agoPut ssherr.h back as it's actually needed.
Darren Tucker [Wed, 2 Oct 2019 04:30:55 +0000 (14:30 +1000)] 
Put ssherr.h back as it's actually needed.

5 years agoDeny (non-fatal) shmget/shmat/shmdt in preauth privsep child.
Lonnie Abelbeck [Tue, 1 Oct 2019 14:05:09 +0000 (09:05 -0500)] 
Deny (non-fatal) shmget/shmat/shmdt in preauth privsep child.

New wait_random_seeded() function on OpenSSL 1.1.1d uses shmget, shmat, and shmdt
in the preauth codepath, deny (non-fatal) in seccomp_filter sandbox.

5 years agoremove duplicate #includes
Damien Miller [Wed, 2 Oct 2019 00:54:28 +0000 (10:54 +1000)] 
remove duplicate #includes

Prompted by Jakub Jelen

5 years agotypo in comment
Damien Miller [Wed, 2 Oct 2019 00:51:15 +0000 (10:51 +1000)] 
typo in comment

5 years agoupstream: remove some duplicate #includes
djm@openbsd.org [Wed, 2 Oct 2019 00:42:30 +0000 (00:42 +0000)] 
upstream: remove some duplicate #includes

OpenBSD-Commit-ID: ed6827ab921eff8027669848ef4f70dc1da4098c

5 years agoupstream: revert unconditional forced login implemented in r1.41 of
djm@openbsd.org [Tue, 1 Oct 2019 10:22:53 +0000 (10:22 +0000)] 
upstream: revert unconditional forced login implemented in r1.41 of

ssh-pkcs11.c; r1.45 added a forced login as a fallback for cases where the
token returns no objects and this is less disruptive for users of tokens
directly in ssh (rather than via ssh-agent) and in ssh-keygen

bz3006, patch from Jakub Jelen; ok markus

OpenBSD-Commit-ID: 33d6df589b072094384631ff93b1030103b3d02e

5 years agoupstream: group and sort single letter options; ok deraadt
jmc@openbsd.org [Sun, 29 Sep 2019 16:31:57 +0000 (16:31 +0000)] 
upstream: group and sort single letter options; ok deraadt

OpenBSD-Commit-ID: e1480e760a2b582f79696cdcff70098e23fc603f

5 years agoupstream: fix the DH-GEX text in -a; because this required a comma,
jmc@openbsd.org [Fri, 27 Sep 2019 20:03:24 +0000 (20:03 +0000)] 
upstream: fix the DH-GEX text in -a; because this required a comma,

i added a comma to the first part, for balance...

OpenBSD-Commit-ID: 2c3464e9e82a41e8cdfe8f0a16d94266e43dbb58

5 years agoupstream: identity_file[] should be PATH_MAX, not the arbitrary
deraadt@openbsd.org [Tue, 24 Sep 2019 12:50:46 +0000 (12:50 +0000)] 
upstream: identity_file[] should be PATH_MAX, not the arbitrary

number 1024

OpenBSD-Commit-ID: e775f94ad47ce9ab37bd1410d7cf3b7ea98b11b7

5 years agoupstream: new sentence, new line;
jmc@openbsd.org [Fri, 20 Sep 2019 18:50:58 +0000 (18:50 +0000)] 
upstream: new sentence, new line;

OpenBSD-Commit-ID: c35ca5ec07be460e95e7406af12eee04a77b6698

5 years agoInclude stdio.h for snprintf.
Darren Tucker [Mon, 30 Sep 2019 08:01:12 +0000 (18:01 +1000)] 
Include stdio.h for snprintf.

Patch from vapier@gentoo.org.

5 years agoAdd SKIP_LTESTS for skipping specific tests.
Darren Tucker [Mon, 30 Sep 2019 04:11:42 +0000 (14:11 +1000)] 
Add SKIP_LTESTS for skipping specific tests.

5 years agoupstream: Test for empty result in expected bits. Remove CRs from log
dtucker@openbsd.org [Fri, 27 Sep 2019 05:25:12 +0000 (05:25 +0000)] 
upstream: Test for empty result in expected bits. Remove CRs from log

as they confuse tools on some platforms.  Re-enable the 3des-cbc test.

OpenBSD-Regress-ID: edf536d4f29fc1ba412889b37247a47f1b49d250

5 years agoRe-enable dhgex test.
Darren Tucker [Fri, 27 Sep 2019 05:26:22 +0000 (15:26 +1000)] 
Re-enable dhgex test.

Since we've added larger fallback groups to dh.c this test will pass
even if there is no moduli file installed on the system.

5 years agoAdd more ToS bits, currently only used by netcat.
Darren Tucker [Tue, 24 Sep 2019 11:17:20 +0000 (21:17 +1000)] 
Add more ToS bits, currently only used by netcat.

5 years agoPrivsep is now required.
Darren Tucker [Thu, 19 Sep 2019 05:41:23 +0000 (15:41 +1000)] 
Privsep is now required.

5 years agoupstream: Allow testing signature syntax and validity without verifying
djm@openbsd.org [Mon, 16 Sep 2019 03:23:02 +0000 (03:23 +0000)] 
upstream: Allow testing signature syntax and validity without verifying

that a signature came from a trusted signer. To discourage accidental or
unintentional use, this is invoked by the deliberately ugly option name
"check-novalidate"

from Sebastian Kinne

OpenBSD-Commit-ID: cea42c36ab7d6b70890e2d8635c1b5b943adcc0b

5 years agoupstream: clarify that IdentitiesOnly also applies to the default
djm@openbsd.org [Fri, 13 Sep 2019 04:52:34 +0000 (04:52 +0000)] 
upstream: clarify that IdentitiesOnly also applies to the default

~/.ssh/id_* keys; bz#3062

OpenBSD-Commit-ID: 604be570e04646f0f4a17026f8b2aada6a585dfa

5 years agoupstream: Plug mem leaks on error paths, based in part on github
dtucker@openbsd.org [Fri, 13 Sep 2019 04:36:43 +0000 (04:36 +0000)] 
upstream: Plug mem leaks on error paths, based in part on github

pr#120 from David Carlier.  ok djm@.

OpenBSD-Commit-ID: c57adeb1022a8148fc86e5a88837b3b156dbdb7e

5 years agoupstream: whitespace
djm@openbsd.org [Fri, 13 Sep 2019 04:31:19 +0000 (04:31 +0000)] 
upstream: whitespace

OpenBSD-Commit-ID: 57a71dd5f4cae8d61e0ac631a862589fb2bfd700

5 years agoupstream: allow %n to be expanded in ProxyCommand strings
djm@openbsd.org [Fri, 13 Sep 2019 04:27:35 +0000 (04:27 +0000)] 
upstream: allow %n to be expanded in ProxyCommand strings

From Zachary Harmany via github.com/openssh/openssh-portable/pull/118
ok dtucker@

OpenBSD-Commit-ID: 7eebf1b7695f50c66d42053d352a4db9e8fb84b6

5 years agoupstream: clarify that ConnectTimeout applies both to the TCP
djm@openbsd.org [Fri, 13 Sep 2019 04:07:42 +0000 (04:07 +0000)] 
upstream: clarify that ConnectTimeout applies both to the TCP

connection and to the protocol handshake/KEX. From Jean-Charles Longuet via
Github PR140

OpenBSD-Commit-ID: ce1766abc6da080f0d88c09c2c5585a32b2256bf

5 years agoupstream: Fix potential truncation warning. ok deraadt.
dtucker@openbsd.org [Mon, 9 Sep 2019 02:31:19 +0000 (02:31 +0000)] 
upstream: Fix potential truncation warning. ok deraadt.

OpenBSD-Commit-ID: d87b7e3a94ec935e8194e7fce41815e22804c3ff

5 years agomemleak of buffer in sshpam_query
Damien Miller [Fri, 13 Sep 2019 03:14:39 +0000 (13:14 +1000)] 
memleak of buffer in sshpam_query

coverity report via Ed Maste; ok dtucker@

5 years agoexplicitly test set[ug]id() return values
Damien Miller [Fri, 13 Sep 2019 03:12:42 +0000 (13:12 +1000)] 
explicitly test set[ug]id() return values

Legacy !_POSIX_SAVED_IDS path only; coverity report via Ed Maste
ok dtucker@

5 years agoupstream: Allow prepending a list of algorithms to the default set
naddy@openbsd.org [Fri, 6 Sep 2019 14:45:34 +0000 (14:45 +0000)] 
upstream: Allow prepending a list of algorithms to the default set

by starting the list with the '^' character, e.g.

HostKeyAlgorithms ^ssh-ed25519
Ciphers ^aes128-gcm@openssh.com,aes256-gcm@openssh.com

ok djm@ dtucker@

OpenBSD-Commit-ID: 1e1996fac0dc8a4b0d0ff58395135848287f6f97

5 years agoupstream: key conversion should fail for !openssl builds, not fall
djm@openbsd.org [Fri, 6 Sep 2019 07:53:40 +0000 (07:53 +0000)] 
upstream: key conversion should fail for !openssl builds, not fall

through to the key generation code

OpenBSD-Commit-ID: b957436adc43c4941e61d61958a193a708bc83c9

5 years agoupstream: typo in previous
djm@openbsd.org [Fri, 6 Sep 2019 06:08:11 +0000 (06:08 +0000)] 
upstream: typo in previous

OpenBSD-Commit-ID: 7c3b94110864771a6b80a0d8acaca34037c3c96e

5 years agoneeds time.h for --without-openssl
Damien Miller [Sun, 8 Sep 2019 04:48:11 +0000 (14:48 +1000)] 
needs time.h for --without-openssl

5 years agomake unittests pass for no-openssl case
Damien Miller [Sat, 7 Sep 2019 09:25:00 +0000 (19:25 +1000)] 
make unittests pass for no-openssl case

5 years agoupstream: avoid compiling certain files that deeply depend on
djm@openbsd.org [Fri, 6 Sep 2019 05:59:41 +0000 (05:59 +0000)] 
upstream: avoid compiling certain files that deeply depend on

libcrypto when WITH_OPENSSL isn't set

OpenBSD-Commit-ID: 569f08445c27124ec7c7f6c0268d844ec56ac061

5 years agoupstream: fixes for !WITH_OPENSSL compilation; ok dtucker@
djm@openbsd.org [Fri, 6 Sep 2019 05:23:55 +0000 (05:23 +0000)] 
upstream: fixes for !WITH_OPENSSL compilation; ok dtucker@

OpenBSD-Commit-ID: 7fd68eaa9e0f7482b5d4c7e8d740aed4770a839f

5 years agoupstream: lots of things were relying on libcrypto headers to
djm@openbsd.org [Fri, 6 Sep 2019 04:53:27 +0000 (04:53 +0000)] 
upstream: lots of things were relying on libcrypto headers to

transitively include various system headers (mostly stdlib.h); include them
explicitly

OpenBSD-Commit-ID: 5b522f4f2d844f78bf1cc4f3f4cc392e177b2080

5 years agoupstream: remove leakmalloc reference; we used this early when
djm@openbsd.org [Fri, 6 Sep 2019 03:30:42 +0000 (03:30 +0000)] 
upstream: remove leakmalloc reference; we used this early when

refactoring but not since

OpenBSD-Commit-ID: bb28ebda8f7c490b87b37954044a6cdd43a7eb2c

5 years agoupstream: Check for RSA support before using it for the user key,
dtucker@openbsd.org [Fri, 6 Sep 2019 04:24:06 +0000 (04:24 +0000)] 
upstream: Check for RSA support before using it for the user key,

otherwise use ed25519 which is supported when built without OpenSSL.

OpenBSD-Regress-ID: 3d23ddfe83c5062f00ac845d463f19a2ec78c0f7

5 years agoProvide explicit path to configure-check.
Darren Tucker [Fri, 6 Sep 2019 04:07:10 +0000 (14:07 +1000)] 
Provide explicit path to configure-check.

On some platforms (at least OpenBSD) make won't search VPATH for target
files, so building out-of-tree will fail at configure-check.  Provide
explicit path.  ok djm@

5 years agoupstream: better error code for bad arguments; inspired by
djm@openbsd.org [Fri, 6 Sep 2019 01:58:50 +0000 (01:58 +0000)] 
upstream: better error code for bad arguments; inspired by

OpenBSD-Commit-ID: dfc263b6041de7f0ed921a1de0b81ddebfab1e0a

5 years agorevert config.h/config.h.in freshness checks
Damien Miller [Thu, 5 Sep 2019 11:38:40 +0000 (21:38 +1000)] 
revert config.h/config.h.in freshness checks

turns out autoreconf and configure don't touch some files if their content
doesn't change, so the mtime can't be relied upon in a makefile rule

5 years agoextend autoconf freshness test
Damien Miller [Thu, 5 Sep 2019 10:54:39 +0000 (20:54 +1000)] 
extend autoconf freshness test

make it cover config.h.in and config.h separately

5 years agocheck that configure/config.h is up to date
Damien Miller [Thu, 5 Sep 2019 10:34:54 +0000 (20:34 +1000)] 
check that configure/config.h is up to date

Ensure they are newer than the configure.ac / aclocal.m4 source

5 years agoupstream: if a PKCS#11 token returns no keys then try to login and
djm@openbsd.org [Thu, 5 Sep 2019 10:05:51 +0000 (10:05 +0000)] 
upstream: if a PKCS#11 token returns no keys then try to login and

refetch them. Based on patch from Jakub Jelen; bz#2430 ok markus@

OpenBSD-Commit-ID: ab53bd6ddd54dd09e54a8bfbed1a984496f08b43

5 years agoupstream: sprinkle in some explicit errors here, otherwise the
djm@openbsd.org [Thu, 5 Sep 2019 09:35:19 +0000 (09:35 +0000)] 
upstream: sprinkle in some explicit errors here, otherwise the

percolate all the way up to dispatch_run_fatal() and lose all meaninful
context

to help with bz#3063; ok dtucker@

OpenBSD-Commit-ID: 5b2da83bb1c4a3471444b7910b2120ae36438a0a

5 years agoupstream: only send ext_info for KEX_INITIAL; bz#2929 ok dtucker
djm@openbsd.org [Thu, 5 Sep 2019 09:25:13 +0000 (09:25 +0000)] 
upstream: only send ext_info for KEX_INITIAL; bz#2929 ok dtucker

OpenBSD-Commit-ID: 00f5c6062f6863769f5447c6346f78c05d2e4a63

5 years agoupstream: macro fix; ok djm
jmc@openbsd.org [Thu, 5 Sep 2019 05:47:23 +0000 (05:47 +0000)] 
upstream: macro fix; ok djm

OpenBSD-Commit-ID: e891dd6c7996114cb32f0924cb7898ab55efde6e

5 years agoupdate fuzzing makefile to more recent clang
Damien Miller [Thu, 5 Sep 2019 05:46:39 +0000 (15:46 +1000)] 
update fuzzing makefile to more recent clang

5 years agofuzzer for sshsig allowed_signers option parsing
Damien Miller [Thu, 5 Sep 2019 05:45:32 +0000 (15:45 +1000)] 
fuzzer for sshsig allowed_signers option parsing

5 years agoupstream: memleak on error path; found by libfuzzer
djm@openbsd.org [Thu, 5 Sep 2019 05:42:59 +0000 (05:42 +0000)] 
upstream: memleak on error path; found by libfuzzer

OpenBSD-Commit-ID: 34d44cb0fb5bdb5fcbc6b02b804e71b20a7a5fc7

5 years agoupstream: expose allowed_signers options parsing code in header for
djm@openbsd.org [Thu, 5 Sep 2019 04:55:32 +0000 (04:55 +0000)] 
upstream: expose allowed_signers options parsing code in header for

fuzzing

rename to make more consistent with philosophically-similar auth
options parsing API.

OpenBSD-Commit-ID: 0c67600ef04187f98e2912ca57b60c22a8025b7c

5 years agoupstream: Call comma-separated lists as such to clarify semantics.
naddy@openbsd.org [Wed, 4 Sep 2019 20:31:15 +0000 (20:31 +0000)] 
upstream: Call comma-separated lists as such to clarify semantics.

Options such as Ciphers take values that may be a list of ciphers; the
complete list, not indiviual elements, may be prefixed with a dash or plus
character to remove from or append to the default list, respectively.

Users might read the current text as if each elment took an optional prefix,
so tweak the wording from "values" to "list" to prevent such ambiguity for
all options supporting these semantics.

Fix instances missed in first commit.  ok jmc@ kn@

OpenBSD-Commit-ID: 7112522430a54fb9f15a7a26d26190ed84d5e417

5 years agoupstream: tweak previous;
jmc@openbsd.org [Wed, 4 Sep 2019 05:56:54 +0000 (05:56 +0000)] 
upstream: tweak previous;

OpenBSD-Commit-ID: 0abd728aef6b5b35f6db43176aa83b7e3bf3ce27

5 years agoupstream: repair typo and editing mishap
naddy@openbsd.org [Tue, 3 Sep 2019 20:51:49 +0000 (20:51 +0000)] 
upstream: repair typo and editing mishap

OpenBSD-Commit-ID: d125ab720ca71ccf9baf83e08ddc8c12a328597e

5 years agoFuzzer harness for sshsig
Damien Miller [Thu, 5 Sep 2019 01:09:28 +0000 (11:09 +1000)] 
Fuzzer harness for sshsig

5 years agooops; missed including the actual file
Damien Miller [Tue, 3 Sep 2019 08:45:42 +0000 (18:45 +1000)] 
oops; missed including the actual file

5 years agoportability fixes for sshsig
Damien Miller [Tue, 3 Sep 2019 08:44:10 +0000 (18:44 +1000)] 
portability fixes for sshsig

5 years agoupstream: regress test for sshsig; feedback and ok markus@
djm@openbsd.org [Tue, 3 Sep 2019 08:37:45 +0000 (08:37 +0000)] 
upstream: regress test for sshsig; feedback and ok markus@

OpenBSD-Regress-ID: 74c0974f2cdae8d9599b9d76a09680bae55d8a8b

5 years agoupstream: only add plain keys to prevent any certs laying around
djm@openbsd.org [Tue, 3 Sep 2019 08:37:06 +0000 (08:37 +0000)] 
upstream: only add plain keys to prevent any certs laying around

from confusing the test.

OpenBSD-Regress-ID: b8f1508f822bc560b98dea910e61ecd76f34100f

5 years agoupstream: sshsig tweaks and improvements from and suggested by
djm@openbsd.org [Tue, 3 Sep 2019 08:35:27 +0000 (08:35 +0000)] 
upstream: sshsig tweaks and improvements from and suggested by

Markus

ok markus/me

OpenBSD-Commit-ID: ea4f46ad5a16b27af96e08c4877423918c4253e9

5 years agoupstream: sshsig: lightweight signature and verification ability
djm@openbsd.org [Tue, 3 Sep 2019 08:34:19 +0000 (08:34 +0000)] 
upstream: sshsig: lightweight signature and verification ability

for OpenSSH

This adds a simple manual signature scheme to OpenSSH.
Signatures can be made and verified using ssh-keygen -Y sign|verify

Signatures embed the key used to make them. At verification time, this
is matched via principal name against an authorized_keys-like list
of allowed signers.

Mostly by Sebastian Kinne w/ some tweaks by me

ok markus@

OpenBSD-Commit-ID: 2ab568e7114c933346616392579d72be65a4b8fb

5 years agoupstream: move authorized_keys option parsing helpsers to misc.c
djm@openbsd.org [Tue, 3 Sep 2019 08:32:11 +0000 (08:32 +0000)] 
upstream: move authorized_keys option parsing helpsers to misc.c

and make them public; ok markus@

OpenBSD-Commit-ID: c18bcb2a687227b3478377c981c2d56af2638ea2

5 years agoupstream: make get_sigtype public as sshkey_get_sigtype(); ok
djm@openbsd.org [Tue, 3 Sep 2019 08:31:20 +0000 (08:31 +0000)] 
upstream: make get_sigtype public as sshkey_get_sigtype(); ok

markus@

OpenBSD-Commit-ID: 01f8cdbec63350490d2249f41112c5780d1cfbb8

5 years agoupstream: move advance_past_options to authfile.c and make it
djm@openbsd.org [Tue, 3 Sep 2019 08:30:47 +0000 (08:30 +0000)] 
upstream: move advance_past_options to authfile.c and make it

public; ok markus@

OpenBSD-Commit-ID: edda2fbba2c5b1f48e60f857a2010479e80c5f3c

5 years agoupstream: move skip_space() to misc.c and make it public; ok
djm@openbsd.org [Tue, 3 Sep 2019 08:29:58 +0000 (08:29 +0000)] 
upstream: move skip_space() to misc.c and make it public; ok

markus@

OpenBSD-Commit-ID: caa77e8a3b210948e29ad3e28c5db00852961eae

5 years agoupstream: authfd: add function to check if key is in agent
djm@openbsd.org [Tue, 3 Sep 2019 08:29:15 +0000 (08:29 +0000)] 
upstream: authfd: add function to check if key is in agent

This commit adds a helper function which allows the caller to
check if a given public key is present in ssh-agent.

work by Sebastian Kinne; ok markus@

OpenBSD-Commit-ID: d43c5826353e1fdc1af71eb42961b30782c7bd13

5 years agoupstream: fix memleak in ssh_free_identitylist(); ok markus@
djm@openbsd.org [Tue, 3 Sep 2019 08:28:30 +0000 (08:28 +0000)] 
upstream: fix memleak in ssh_free_identitylist(); ok markus@

OpenBSD-Commit-ID: aa51f77ae2c5330a1f61b2d22933f24a443f9abf

5 years agoupstream: factor out confirm_overwrite(); ok markus@
djm@openbsd.org [Tue, 3 Sep 2019 08:27:52 +0000 (08:27 +0000)] 
upstream: factor out confirm_overwrite(); ok markus@

OpenBSD-Commit-ID: 304e95381b39c774c8fced7e5328b106a3ff0400

5 years agoupstream: constify an argument
djm@openbsd.org [Mon, 2 Sep 2019 23:46:46 +0000 (23:46 +0000)] 
upstream: constify an argument

OpenBSD-Commit-ID: 724bafc9f993746ad4303e95bede2c030de6233b

5 years agoupstream: downgrade PKCS#11 "provider returned no slots" warning
djm@openbsd.org [Mon, 2 Sep 2019 00:19:25 +0000 (00:19 +0000)] 
upstream: downgrade PKCS#11 "provider returned no slots" warning

from log level error to debug. This is common when attempting to enumerate
keys on smartcard readers with no cards plugged in. bz#3058 ok dtucker@

OpenBSD-Commit-ID: bb8839ddeb77c271390488af1b771041d43e49c6

5 years agoupstream: print comment when printing pubkey from private
djm@openbsd.org [Sun, 1 Sep 2019 23:47:32 +0000 (23:47 +0000)] 
upstream: print comment when printing pubkey from private

bz#3052; ok dtucker

OpenBSD-Commit-ID: a91b2a8d5f1053d34d7fce44523c53fb534ba914

5 years agofixed test in OSX closefrom() replacement
Damien Miller [Mon, 2 Sep 2019 00:28:42 +0000 (10:28 +1000)] 
fixed test in OSX closefrom() replacement

from likan_999.student AT sina.com

5 years agoretain Solaris PRIV_FILE_LINK_ANY in sftp-server
Damien Miller [Mon, 2 Sep 2019 00:22:02 +0000 (10:22 +1000)] 
retain Solaris PRIV_FILE_LINK_ANY in sftp-server

Dropping this privilege removes the ability to create hard links to
files owned by other users. This is required for the legacy sftp rename
operation.

bz#3036; approach ok Alex Wilson (the original author of the Solaris
sandbox/pledge replacement code)

5 years agoupstream: Use ed25519 for most hostkey rotation tests since it's
dtucker@openbsd.org [Fri, 30 Aug 2019 05:08:28 +0000 (05:08 +0000)] 
upstream: Use ed25519 for most hostkey rotation tests since it's

supported even when built without OpenSSL.  Use RSA for the secondary type
test if supported, otherwise skip it.  Fixes this test for !OpenSSL builds.

OpenBSD-Regress-ID: 101cb34a84fd974c623bdb2e496f25a6e91be109

5 years agoupstream: Test did not compile due to missing symbols. Add source
bluhm@openbsd.org [Thu, 22 Aug 2019 21:47:27 +0000 (21:47 +0000)] 
upstream: Test did not compile due to missing symbols. Add source

sshbuf-misc.c to regress as it was done in ssh make file. from Moritz Buhl

OpenBSD-Regress-ID: 9e1c23476bb845f3cf3d15d9032da3ed0cb2fcf5

5 years agotweak warning flags
Damien Miller [Fri, 30 Aug 2019 04:26:19 +0000 (14:26 +1000)] 
tweak warning flags

Enable -Wextra if compiler supports it

Set -Wno-error=format-truncation if available to prevent expected
string truncations in openbsd-compat from breaking -Werror builds