]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
3 years agoUpdate the list of tests that don't work on Minix.
Darren Tucker [Thu, 9 Dec 2021 23:27:27 +0000 (10:27 +1100)] 
Update the list of tests that don't work on Minix.

While there, remove CC (configure will now find clang) and make the test
list easier to update via cut and paste.

3 years agoAdd minix host tuple.
Darren Tucker [Thu, 9 Dec 2021 23:12:57 +0000 (10:12 +1100)] 
Add minix host tuple.

Define SETEUID_BREAKS_SETUID for it which should make privsep work.

3 years agoupstream: fix unintended sizeof pointer in debug path ok markus@
jsg@openbsd.org [Sun, 5 Dec 2021 12:28:27 +0000 (12:28 +0000)] 
upstream: fix unintended sizeof pointer in debug path ok markus@

OpenBSD-Commit-ID: b9c0481ffc0cd801e0840e342e6a282a85aac93c

3 years agoupstream: RSA/SHA-1 is not used by default anymore on the server
naddy@openbsd.org [Sat, 4 Dec 2021 00:05:39 +0000 (00:05 +0000)] 
upstream: RSA/SHA-1 is not used by default anymore on the server

OpenBSD-Commit-ID: 64abef6cfc3e53088225f6b8a1dcd86d52dc8353

3 years agoupstream: hash full host:port when asked to hash output, fixes hashes
djm@openbsd.org [Thu, 2 Dec 2021 23:45:36 +0000 (23:45 +0000)] 
upstream: hash full host:port when asked to hash output, fixes hashes

for non- default ports. bz3367 ok dtucker@

OpenBSD-Commit-ID: 096021cc847da7318ac408742f2d0813ebe9aa73

3 years agoupstream: improve the testing of credentials against inserted FIDO
djm@openbsd.org [Thu, 2 Dec 2021 23:23:13 +0000 (23:23 +0000)] 
upstream: improve the testing of credentials against inserted FIDO

keys a little more: ask the token whether a particular key belongs to it in
cases where the token support on-token user- verification (e.g. biometrics)
rather than just assuming that it will accept it.

Will reduce spurious "Confirm user presence" notifications for key
handles that relate to FIDO keys that are not currently inserted in at
least some cases.

Motivated by bz3366; by Pedro Martelletto

OpenBSD-Commit-ID: ffac7f3215842397800e1ae2e20229671a55a63d

3 years agoupstream: move check_sk_options() up so we can use it earlier
djm@openbsd.org [Thu, 2 Dec 2021 22:40:05 +0000 (22:40 +0000)] 
upstream: move check_sk_options() up so we can use it earlier

OpenBSD-Commit-ID: 67fe98ba1c846d22035279782c4664c1865763b4

3 years agoupstream: ssh-rsa is no longer in the default for
dtucker@openbsd.org [Thu, 2 Dec 2021 22:35:05 +0000 (22:35 +0000)] 
upstream: ssh-rsa is no longer in the default for

PubkeyAcceptedAlgorithms.

OpenBSD-Commit-ID: 34a9e1bc30966fdcc922934ae00f09f2596cd73c

3 years agoupstream: don't put the tty into raw mode when SessionType=none, avoids
djm@openbsd.org [Thu, 2 Dec 2021 02:44:44 +0000 (02:44 +0000)] 
upstream: don't put the tty into raw mode when SessionType=none, avoids

^c being unable to kill such a session. bz3360; ok dtucker@

OpenBSD-Commit-ID: 83960c433052303b643b4c380ae2f799ac896f65

3 years agoprevious commit broke bcrypt_pbkdf()
Damien Miller [Mon, 29 Nov 2021 03:11:03 +0000 (14:11 +1100)] 
previous commit broke bcrypt_pbkdf()

Accidentally reverted part of the conversion to use SHA512 from SUPERCOP
instead of OpenBSD-style libc SHA512.

3 years agoFix typo in Neils' name.
Darren Tucker [Mon, 29 Nov 2021 03:03:19 +0000 (14:03 +1100)] 
Fix typo in Neils' name.

3 years agosync bcrypt-related files with OpenBSD
Damien Miller [Mon, 29 Nov 2021 01:30:22 +0000 (12:30 +1100)] 
sync bcrypt-related files with OpenBSD

The main change is that Niels Provos kindly agreed to rescind the
BSD license advertising clause, shifting them to the 3-term BSD
license.

This was the last thing in OpenSSH that used the advertising clause.

3 years agodepend
Damien Miller [Mon, 29 Nov 2021 01:29:29 +0000 (12:29 +1100)] 
depend

3 years agoupstream: sshsig: return "key not found" when searching empty files
djm@openbsd.org [Sun, 28 Nov 2021 07:21:26 +0000 (07:21 +0000)] 
upstream: sshsig: return "key not found" when searching empty files

rather than "internal error"

OpenBSD-Commit-ID: e2ccae554c78d7a7cd33fc5d217f35be7e2507ed

3 years agoupstream: ssh-keygen -Y match-principals doesn't accept any -O
djm@openbsd.org [Sun, 28 Nov 2021 07:15:10 +0000 (07:15 +0000)] 
upstream: ssh-keygen -Y match-principals doesn't accept any -O

options at present, so don't say otherwise in SYNOPSIS; spotted jmc@

OpenBSD-Commit-ID: 9cc43a18f4091010741930b48b3db2f2e4f1d35c

3 years agoupstream: fix indenting in last commit
djm@openbsd.org [Sun, 28 Nov 2021 07:14:29 +0000 (07:14 +0000)] 
upstream: fix indenting in last commit

OpenBSD-Commit-ID: 8b9ba989815d0dec1fdf5427a4a4b58eb9cac4d2

3 years agoupstream: missing initialisation for oerrno
djm@openbsd.org [Sun, 28 Nov 2021 07:10:18 +0000 (07:10 +0000)] 
upstream: missing initialisation for oerrno

OpenBSD-Commit-ID: 05d646bba238080259bec821c831a6f0b48d2a95

3 years agoCorrect ifdef to activate poll() only if needed.
Darren Tucker [Sun, 28 Nov 2021 04:31:37 +0000 (15:31 +1100)] 
Correct ifdef to activate poll() only if needed.

3 years agoupstream: whitespac e
djm@openbsd.org [Sat, 27 Nov 2021 07:23:35 +0000 (07:23 +0000)] 
upstream: whitespac e

OpenBSD-Regress-ID: b9511d41568056bda489e13524390167889908f8

3 years agoupstream: regression test for match-principals. Mostly by Fabian
djm@openbsd.org [Sat, 27 Nov 2021 07:20:58 +0000 (07:20 +0000)] 
upstream: regression test for match-principals. Mostly by Fabian

Stelzer

OpenBSD-Regress-ID: ced0bec89af90935103438986bbbc4ad1df9cfa7

3 years agoupstream: Add ssh-keygen -Y match-principals operation to perform
djm@openbsd.org [Sat, 27 Nov 2021 07:14:46 +0000 (07:14 +0000)] 
upstream: Add ssh-keygen -Y match-principals operation to perform

matching of principals names against an allowed signers file.

Requested by and mostly written by Fabian Stelzer, towards a TOFU
model for SSH signatures in git. Some tweaks by me.

"doesn't bother me" deraadt@

OpenBSD-Commit-ID: 8d1b71f5a4127bc5e10a880c8ea6053394465247

3 years agoupstream: debug("func: ...") -> debug_f("...")
djm@openbsd.org [Thu, 25 Nov 2021 23:02:24 +0000 (23:02 +0000)] 
upstream: debug("func: ...") -> debug_f("...")

OpenBSD-Commit-ID: d58494dc05c985326a895adfbe16fbd5bcc54347

3 years agoAllow for fd = -1 in compat ppoll overflow check.
Darren Tucker [Fri, 19 Nov 2021 07:53:46 +0000 (18:53 +1100)] 
Allow for fd = -1 in compat ppoll overflow check.

Fixes tests on at least FreeBSD 6, possibly others.

3 years agoDon't auto-enable Capsicum sandbox on FreeBSD 9/10.
Darren Tucker [Fri, 19 Nov 2021 05:01:51 +0000 (16:01 +1100)] 
Don't auto-enable Capsicum sandbox on FreeBSD 9/10.

Since we changed from select() to ppoll() tests have been failing.
This seems to be because FreeBSD 10 (and presumably 9) do not allow
ppoll() in the privsep process and sshd will fail with "Not permitted in
capability mode".  Setting CAP_EVENT on the FDs doesn't help, but weirdly,
poll() works without that.  Those versions are EOL so this situation is
unlikely to change.

3 years agoupstream: regression test for ssh-keygen -Y find-principals fix; from
djm@openbsd.org [Thu, 18 Nov 2021 03:53:48 +0000 (03:53 +0000)] 
upstream: regression test for ssh-keygen -Y find-principals fix; from

Fabian Stelzer ok djm markus

OpenBSD-Regress-ID: 34fe4088854c1a2eb4c0c51cc4676ba24096bac4

3 years agoupstream: less confusing debug message; bz#3365
djm@openbsd.org [Thu, 18 Nov 2021 21:32:11 +0000 (21:32 +0000)] 
upstream: less confusing debug message; bz#3365

OpenBSD-Commit-ID: 836268d3642c2cdc84d39b98d65837f5241e4a50

3 years agoupstream: avoid xmalloc(0) for PKCS#11 keyid for ECDSA keys (we
djm@openbsd.org [Thu, 18 Nov 2021 21:11:01 +0000 (21:11 +0000)] 
upstream: avoid xmalloc(0) for PKCS#11 keyid for ECDSA keys (we

already did this for RSA keys). Avoids fatal errors for PKCS#11 libraries
that return empty keyid, e.g. Microchip ATECC608B "cryptoauthlib"; bz#3364

OpenBSD-Commit-ID: 054d4dc1d6a99a2e6f8eebc48207b534057c154d

3 years agoupstream: ssh-keygen -Y find-principals was verifying key validity
djm@openbsd.org [Thu, 18 Nov 2021 03:50:41 +0000 (03:50 +0000)] 
upstream: ssh-keygen -Y find-principals was verifying key validity

when using ca certs but not with simple key lifetimes within the allowed
signers file.

Since it returns the first keys principal it finds this could
result in a principal with an expired key even though a valid
one is just below.

patch from Fabian Stelzer; feedback/ok djm markus

OpenBSD-Commit-ID: b108ed0a76b813226baf683ab468dc1cc79e0905

3 years agoCorrect calculation of tv_nsec in poll().
Darren Tucker [Thu, 18 Nov 2021 12:44:07 +0000 (23:44 +1100)] 
Correct calculation of tv_nsec in poll().

3 years agoAdd compat implementation of ppoll using pselect.
Darren Tucker [Thu, 18 Nov 2021 12:11:37 +0000 (23:11 +1100)] 
Add compat implementation of ppoll using pselect.

3 years agoPut poll.h inside ifdef HAVE_POLL_H.
Darren Tucker [Thu, 18 Nov 2021 12:05:34 +0000 (23:05 +1100)] 
Put poll.h inside ifdef HAVE_POLL_H.

3 years agoupstream: check for POLLHUP wherever we check for POLLIN
djm@openbsd.org [Thu, 18 Nov 2021 03:31:44 +0000 (03:31 +0000)] 
upstream: check for POLLHUP wherever we check for POLLIN

OpenBSD-Commit-ID: 6aa6f3ec6b17c3bd9bfec672a917f003a76d93e5

3 years agoupstream: fd leak in sshd listen loop error path; from Gleb
djm@openbsd.org [Thu, 18 Nov 2021 03:07:59 +0000 (03:07 +0000)] 
upstream: fd leak in sshd listen loop error path; from Gleb

Smirnoff

OpenBSD-Commit-ID: a7a2be27a690a74bf2381bc16cea38e265657412

3 years agoupstream: check for POLLHUP as well as POLLIN in sshd listen loop;
djm@openbsd.org [Thu, 18 Nov 2021 03:07:20 +0000 (03:07 +0000)] 
upstream: check for POLLHUP as well as POLLIN in sshd listen loop;

ok deraadt millert

OpenBSD-Commit-ID: a4f1244c5a9c2b08dac4f3b1dc22e9d1dc60c587

3 years agoupstream: check for POLLHUP as well as POLLIN, handle transient IO
djm@openbsd.org [Thu, 18 Nov 2021 03:06:03 +0000 (03:06 +0000)] 
upstream: check for POLLHUP as well as POLLIN, handle transient IO

errors as well as half-close on the output side; ok deraadt millert

OpenBSD-Commit-ID: de5c5b9939a37476d256328cbb96305bdecf511e

3 years agoadjust seccomp filter for select->poll conversion
Damien Miller [Wed, 17 Nov 2021 23:16:55 +0000 (10:16 +1100)] 
adjust seccomp filter for select->poll conversion

Needed to add ppoll syscall but also to relax the fallback rlimit
sandbox. Linux poll() fails with EINVAL if npfds > RLIMIT_NOFILE,
so we have to allow a single fd in the rlimit.

3 years agoupdate depends
Damien Miller [Wed, 17 Nov 2021 23:16:44 +0000 (10:16 +1100)] 
update depends

3 years agocompat for timespecsub() and friends
Damien Miller [Wed, 17 Nov 2021 22:26:20 +0000 (09:26 +1100)] 
compat for timespecsub() and friends

3 years agoupstream: set num_listen_socks to 0 on close-all instead of -1,
djm@openbsd.org [Wed, 17 Nov 2021 21:06:39 +0000 (21:06 +0000)] 
upstream: set num_listen_socks to 0 on close-all instead of -1,

which interferes with the new poll()-based listen loop; spotted and debugged
by anton@+deraadt@

OpenBSD-Commit-ID: f7ab8ab124f615a2e0c45fee14c38d2f2abbabbd

3 years agoupstream: use ppoll() instead of pselect() with djm
deraadt@openbsd.org [Sun, 14 Nov 2021 18:47:43 +0000 (18:47 +0000)] 
upstream: use ppoll() instead of pselect() with djm

OpenBSD-Commit-ID: 980f87c9564d5d2ad55722b7a6f44f21284cd215

3 years agoupstream: match .events with .fd better
deraadt@openbsd.org [Sun, 14 Nov 2021 06:15:36 +0000 (06:15 +0000)] 
upstream: match .events with .fd better

OpenBSD-Commit-ID: 77eef212ca0add905949532af390164489c5984b

3 years agoupstream: convert select() to poll() ok djm
deraadt@openbsd.org [Sun, 14 Nov 2021 03:25:10 +0000 (03:25 +0000)] 
upstream: convert select() to poll() ok djm

OpenBSD-Commit-ID: b53e4940ff10dd24f8d16e8db8ef1970015d7ead

3 years agoupstream: replace select() with ppoll(), including converting
deraadt@openbsd.org [Sat, 13 Nov 2021 21:14:13 +0000 (21:14 +0000)] 
upstream: replace select() with ppoll(), including converting

timeval's to timespec's to make things easier. back and forth and ok; djm

OpenBSD-Commit-ID: 89d3b23c60875da919e7820f9de6213286ffbec9

3 years agoupstream: It really looks like pledge "stdio dns" is possible
deraadt@openbsd.org [Sat, 13 Nov 2021 17:26:13 +0000 (17:26 +0000)] 
upstream: It really looks like pledge "stdio dns" is possible

earlier. Discussed with mestre

OpenBSD-Commit-ID: 610873de63a593e0ac7bbbcb7a0f2894d36f4c01

3 years agoupstream: aggressively pre-fill the pollfd array with fd=-1
deraadt@openbsd.org [Fri, 12 Nov 2021 05:23:49 +0000 (05:23 +0000)] 
upstream: aggressively pre-fill the pollfd array with fd=-1

OpenBSD-Commit-ID: c2a525de8f83c1a04405bd79122c424140552a5b

3 years agoupstream: Convert from select() to ppoll(). Along the way, I
deraadt@openbsd.org [Thu, 11 Nov 2021 15:32:32 +0000 (15:32 +0000)] 
upstream: Convert from select() to ppoll(). Along the way, I

observed that the select() code was using exceptfds incorrectly.. ok millert

OpenBSD-Commit-ID: 548e05bfc31b2af02319eb3d051286d4128dec96

3 years agoSwitch from LibreSSL 3.4.0 to 3.4.1.
Darren Tucker [Fri, 12 Nov 2021 11:55:27 +0000 (22:55 +1100)] 
Switch from LibreSSL 3.4.0 to 3.4.1.

The LibreSSL 3.4.0 release has an OPENBSD_BRANCH that points to
"master" and that branch no longer has the files LibreSSL expects
and thus it will no longer build, breaking the test.

3 years agoupstream: add the sntrup761x25519-sha512@openssh.com hybrid
djm@openbsd.org [Wed, 10 Nov 2021 06:29:25 +0000 (06:29 +0000)] 
upstream: add the sntrup761x25519-sha512@openssh.com hybrid

ECDH/x25519 + Streamlined NTRU Prime post-quantum KEX to the default
KEXAlgorithms list (after the ECDH methods but before the prime-group DH
ones).

ok markus@

OpenBSD-Commit-ID: 22b77e27a04e497a10e22f138107579652854210

3 years agoupstream: fix ssh-keysign for KEX algorithms that use SHA384/512
djm@openbsd.org [Wed, 10 Nov 2021 06:25:08 +0000 (06:25 +0000)] 
upstream: fix ssh-keysign for KEX algorithms that use SHA384/512

exchange hashes; feedback/ok markus@

OpenBSD-Commit-ID: 09a8fda1c081f5de1e3128df64f28b7bdadee239

3 years agoupstream: improve error message when trying to expand a ~user path
djm@openbsd.org [Mon, 8 Nov 2021 21:32:49 +0000 (21:32 +0000)] 
upstream: improve error message when trying to expand a ~user path

for a user that doesn't exist; better matches what the shell does

ok deraadt@

OpenBSD-Commit-ID: 1ddefa3c3a78b69ce13d1b8f67bc9f2cefd23ad6

3 years agoDon't trust closefrom() on Linux.
Darren Tucker [Wed, 10 Nov 2021 01:34:25 +0000 (12:34 +1100)] 
Don't trust closefrom() on Linux.

glibc's closefrom implementation does not work in a chroot when the kernel
does not have close_range.  It tries to read from /proc/self/fd and when
that fails dies with an assertion of sorts.  Instead, call close_range
ourselves from our compat code and fall back if that fails.  bz#3349,
with william.wilson at canonical.com and fweimer at redhat.com.

3 years agoupstream: Plug a couple of minor mem leaks. From beldmit at
dtucker@openbsd.org [Sat, 6 Nov 2021 10:13:39 +0000 (10:13 +0000)] 
upstream: Plug a couple of minor mem leaks. From beldmit at

gmail.com via github PR#283, ok markus@

OpenBSD-Commit-ID: ec1fa7d305d46226861c3ca6fb9c9beb2ada2892

3 years agoupstream: move cert_filter_principals() to earlier in the file for
djm@openbsd.org [Fri, 5 Nov 2021 03:10:58 +0000 (03:10 +0000)] 
upstream: move cert_filter_principals() to earlier in the file for

reuse; no code change

OpenBSD-Commit-ID: 598fa9528b656b2f38bcc3cf5b6f3869a8c115cf

3 years agoupstream: Many downstreams expect ssh to compile as non-C99...
deraadt@openbsd.org [Wed, 3 Nov 2021 22:00:56 +0000 (22:00 +0000)] 
upstream: Many downstreams expect ssh to compile as non-C99...

OpenBSD-Commit-ID: e6aa3e08bda68e5fb838fc8a49b1d2dfc38ee783

3 years agoSkip getline() on HP-UX 10.x.
Darren Tucker [Sat, 6 Nov 2021 10:07:03 +0000 (21:07 +1100)] 
Skip getline() on HP-UX 10.x.

HP-UX 10.x has a getline() implementation in libc that does not behave
as we expect so don't use it.  With correction from Thorsten Glaser and
typo fix from Larkin Nickle.

3 years agobasic SECURITY.md (refers people to the website)
Damien Miller [Wed, 3 Nov 2021 01:08:21 +0000 (12:08 +1100)] 
basic SECURITY.md (refers people to the website)

3 years agoupstream: crank SSH_SK_VERSION_MAJOR to match recent change in
djm@openbsd.org [Tue, 2 Nov 2021 22:57:27 +0000 (22:57 +0000)] 
upstream: crank SSH_SK_VERSION_MAJOR to match recent change in

usr/bin/ssh

OpenBSD-Regress-ID: 113d181c7e3305e138db9b688cdb8b0a0019e552

3 years agoupstream: Better handle FIDO keys on tokens that provide user
djm@openbsd.org [Tue, 2 Nov 2021 22:56:40 +0000 (22:56 +0000)] 
upstream: Better handle FIDO keys on tokens that provide user

verification (UV) on the device itself, including biometric keys.

Query the token during key creation to determine whether it supports
on-token UV and, if so, clear the SSH_SK_USER_VERIFICATION_REQD flag
in the key so that ssh(1) doesn't automatically prompty for PIN later.

When making signatures with the key, query the token's capabilities
again and check whether the token is able (right now) to perform user-
verification without a PIN. If it is then the PIN prompt is bypassed
and user verification delegated to the token. If not (e.g. the token
is biometric capable, but no biometric are enrolled), then fall back
to user verification via the usual PIN prompt.

Work by Pedro Martelletto; ok myself and markus@

NB. cranks SSH_SK_VERSION_MAJOR

OpenBSD-Commit-ID: e318a8c258d9833a0b7eb0236cdb68b5143b2f27

3 years agoupstream: sshsig: add tests for signing key validity and
djm@openbsd.org [Fri, 29 Oct 2021 03:03:06 +0000 (03:03 +0000)] 
upstream: sshsig: add tests for signing key validity and

find-principals

- adds generic find-principals tests (this command had none before)
- tests certs with a timeboxed validity both with and without a
 restriced lifetime for the CA
- test for a revoked CA cert

by Fabian Stelzer

OpenBSD-Regress-ID: 9704b2c6df5b8ccfbdf2c06c5431f5f8cad280c9

3 years agoupstream: avoid signedness warning; spotted in -portable
djm@openbsd.org [Fri, 29 Oct 2021 02:48:19 +0000 (02:48 +0000)] 
upstream: avoid signedness warning; spotted in -portable

OpenBSD-Regress-ID: 4cacc126086487c0ea7f3d86b42dec458cf0d0c6

3 years agoupstream: ssh-keygen: make verify-time argument parsing optional
djm@openbsd.org [Fri, 29 Oct 2021 03:20:46 +0000 (03:20 +0000)] 
upstream: ssh-keygen: make verify-time argument parsing optional

From Fabian Stelzer

OpenBSD-Commit-ID: 1ff35e4c366a45a073663df90381be6a8ef4d370

3 years agounbreak fuzz harness for recent changes
Damien Miller [Fri, 29 Oct 2021 02:48:34 +0000 (13:48 +1100)] 
unbreak fuzz harness for recent changes

3 years agoUse -Wbitwise-instead-of-logical if supported.
Darren Tucker [Fri, 29 Oct 2021 02:32:24 +0000 (13:32 +1100)] 
Use -Wbitwise-instead-of-logical if supported.

3 years agouse -Wmisleading-indentation cflag if available
Damien Miller [Thu, 28 Oct 2021 05:24:53 +0000 (16:24 +1100)] 
use -Wmisleading-indentation cflag if available

ok dtucker@

3 years agodepend
Damien Miller [Thu, 28 Oct 2021 05:24:44 +0000 (16:24 +1100)] 
depend

3 years agoremove built-in support for md5crypt()
Damien Miller [Thu, 6 May 2021 00:08:30 +0000 (10:08 +1000)] 
remove built-in support for md5crypt()

Users of MD5-hashed password should arrange for ./configure to link
against libxcrypt or similar. Though it would be better to avoid use
of MD5 password hashing entirely, it's arguably worse than DEScrypt.

feedback and ok dtucker@

3 years agoupstream: increment SSH_SK_VERSION_MAJOR to match last change
djm@openbsd.org [Thu, 28 Oct 2021 02:55:30 +0000 (02:55 +0000)] 
upstream: increment SSH_SK_VERSION_MAJOR to match last change

OpenBSD-Regress-ID: 17873814d1cbda97f49c8528d7b5ac9cadf6ddc0

3 years agoupstream: When downloading resident keys from a FIDO token, pass
djm@openbsd.org [Thu, 28 Oct 2021 02:54:18 +0000 (02:54 +0000)] 
upstream: When downloading resident keys from a FIDO token, pass

back the user ID that was used when the key was created and append it to the
filename the key is written to (if it is not the default).

Avoids keys being clobbered if the user created multiple
resident keys with the same application string but different
user IDs.

feedback Pedro Martelletto; ok markus

NB. increments SSH_SK_VERSION_MAJOR

OpenBSD-Commit-ID: dbd658b5950f583106d945641a634bc6562dd3a3

3 years agoupstream: For open/openat, if the flags parameter does not contain
deraadt@openbsd.org [Sun, 24 Oct 2021 21:24:17 +0000 (21:24 +0000)] 
upstream: For open/openat, if the flags parameter does not contain

O_CREAT, the 3rd (variadic) mode_t parameter is irrelevant.  Many developers
in the past have passed mode_t (0, 044, 0644, or such), which might lead
future people to copy this broken idiom, and perhaps even believe this
parameter has some meaning or implication or application. Delete them all.
This comes out of a conversation where tb@ noticed that a strange (but
intentional) pledge behaviour is to always knock-out high-bits from mode_t on
a number of system calls as a safety factor, and his bewilderment that this
appeared to be happening against valid modes (at least visually), but no
sorry, they are all irrelevant junk.  They could all be 0xdeafbeef. ok
millert

OpenBSD-Commit-ID: 503d11633497115688c0c6952686524f01f53121

3 years agokitchensink test target now needs krb5.
Darren Tucker [Fri, 22 Oct 2021 12:27:41 +0000 (23:27 +1100)] 
kitchensink test target now needs krb5.

3 years agoTest both MIT KRB5 and Heimdal.
Darren Tucker [Fri, 22 Oct 2021 11:54:33 +0000 (22:54 +1100)] 
Test both MIT KRB5 and Heimdal.

3 years agoupstream: Plug mem addrinfo mem leaks.
dtucker@openbsd.org [Fri, 22 Oct 2021 10:51:57 +0000 (10:51 +0000)] 
upstream: Plug mem addrinfo mem leaks.

Prevent mem leaks in the (unlikely) event that getaddrinfo returns
no addresses.  ALso, remove an unneeded NULL check in addr_ntop. From
khaleesicodes via github PR#281, ok deraadt@

OpenBSD-Commit-ID: e8a5afc686376637c355c5f7e122dc4b080b9c1a

3 years agoupstream: Remove unnecessary semicolons
dtucker@openbsd.org [Fri, 22 Oct 2021 09:22:04 +0000 (09:22 +0000)] 
upstream: Remove unnecessary semicolons

... in case statements. From khaleesicodes via github PR#280.

OpenBSD-Commit-ID: e1e89360b65775cff83e77ce040b342015caf4ed

3 years agoupstream: Fix typos in comments.
dtucker@openbsd.org [Fri, 22 Oct 2021 09:19:34 +0000 (09:19 +0000)] 
upstream: Fix typos in comments.

From khaleesicodes via github PR#280.

OpenBSD-Commit-ID: 26fdd83652c40f098bf7c685e8ebb9eb72cc45fc

3 years agoupstream: switch scp(1) back to sftp protocol.
deraadt@openbsd.org [Fri, 15 Oct 2021 14:46:46 +0000 (14:46 +0000)] 
upstream: switch scp(1) back to sftp protocol.

openbsd 7.0 release shipped with the (hopefully last) scp that uses RCP
protocol for copying.  Let's get back to testing the SFTP protocol.

OpenBSD-Commit-ID: 9eaa35d95fd547b78b0a043b3f518e135f151f30

3 years agoSource configs script so setup_ci can use settings
Darren Tucker [Fri, 22 Oct 2021 03:00:05 +0000 (14:00 +1100)] 
Source configs script so setup_ci can use settings

3 years agoInstall libedit and pam based on config flags.
Darren Tucker [Thu, 21 Oct 2021 22:42:14 +0000 (09:42 +1100)] 
Install libedit and pam based on config flags.

3 years agoDon't use 'here string", it's not POSIX.
Darren Tucker [Thu, 21 Oct 2021 05:53:39 +0000 (16:53 +1100)] 
Don't use 'here string", it's not POSIX.

3 years agoRemove -Werror from compiler package to install.
Darren Tucker [Thu, 21 Oct 2021 04:33:27 +0000 (15:33 +1100)] 
Remove -Werror from compiler package to install.

3 years agoBuild with -Werror on most recent gcc and clang.
Darren Tucker [Thu, 21 Oct 2021 04:00:53 +0000 (15:00 +1100)] 
Build with -Werror on most recent gcc and clang.

3 years agoInclude string.h and stdio.h for strerror.
Darren Tucker [Fri, 15 Oct 2021 01:59:06 +0000 (12:59 +1100)] 
Include string.h and stdio.h for strerror.

3 years agoInclude error reason if trace disabling fails.
Darren Tucker [Fri, 15 Oct 2021 01:43:36 +0000 (12:43 +1100)] 
Include error reason if trace disabling fails.

3 years agoAdd tcmalloc test target.
Darren Tucker [Tue, 12 Oct 2021 11:55:51 +0000 (22:55 +1100)] 
Add tcmalloc test target.

3 years agoupstream: Document that CASignatureAlgorithms, ExposeAuthInfo and
dtucker@openbsd.org [Sat, 9 Oct 2021 10:52:42 +0000 (10:52 +0000)] 
upstream: Document that CASignatureAlgorithms, ExposeAuthInfo and

PubkeyAuthOptions can be used in a Match block.  Patch from eehakkin via
github PR#277.

OpenBSD-Commit-ID: c0a63f5f52e918645967ac022b28392da4b866aa

3 years agoSkip SK unit tests when built without security-key
Darren Tucker [Thu, 7 Oct 2021 04:55:49 +0000 (15:55 +1100)] 
Skip SK unit tests when built without security-key

3 years agoInclude relevant env vars on command line.
Darren Tucker [Thu, 7 Oct 2021 04:55:04 +0000 (15:55 +1100)] 
Include relevant env vars on command line.

Makes it easier to reproduce a build by cut/pasting the configure line.

3 years agoOnly enable sk-* key types if ENABLE_SK is defined
Darren Tucker [Thu, 7 Oct 2021 03:28:02 +0000 (14:28 +1100)] 
Only enable sk-* key types if ENABLE_SK is defined

3 years agoDisable security key on minix3.
Darren Tucker [Wed, 6 Oct 2021 07:14:37 +0000 (18:14 +1100)] 
Disable security key on minix3.

The test doesn't work so disable.

3 years agoAdd USE_LIBC_SHA2 for (at least) NetBSD 9.
Darren Tucker [Wed, 6 Oct 2021 06:45:28 +0000 (17:45 +1100)] 
Add USE_LIBC_SHA2 for (at least) NetBSD 9.

3 years agoDefine OPENSSL_NO_SHA including OpenSSL from test.
Darren Tucker [Wed, 6 Oct 2021 06:09:31 +0000 (17:09 +1100)] 
Define OPENSSL_NO_SHA including OpenSSL from test.

We don't use SHA256 from OpenSSL in the sk-dummy module and the
definitions can conflict with system sha2.h (eg on NetBSD) so define
OPENSSL_NO_SHA so we don't attempt to redefine them.

3 years agoDisable security key on NetBSD4 test.
Darren Tucker [Wed, 6 Oct 2021 04:40:58 +0000 (15:40 +1100)] 
Disable security key on NetBSD4 test.

sk-dummy used for the security key test includes both sha2.h and OpenSSL
causing the definitions conflict so disable security key support on this
platform.

3 years agoclean regress/misc/sk-dummy in cleandir target
Damien Miller [Wed, 6 Oct 2021 04:07:01 +0000 (15:07 +1100)] 
clean regress/misc/sk-dummy in cleandir target

3 years agoupstream: Dynamically allocate encoded HashKnownHosts and free as
dtucker@openbsd.org [Sat, 2 Oct 2021 03:17:01 +0000 (03:17 +0000)] 
upstream: Dynamically allocate encoded HashKnownHosts and free as

appropriate. Saves 1k of static storage and prevents snprintf "possible
truncation" warnings from newer compilers (although in this case it's false
positive since the actual sizes are limited by the output size of the SHA1).
ok djm@

OpenBSD-Commit-ID: e254ae723f7e3dce352c7d5abc4b6d87faf61bf4

3 years agoupstream: use libc SHA256 functions; make this work when compiled
djm@openbsd.org [Wed, 6 Oct 2021 03:35:13 +0000 (03:35 +0000)] 
upstream: use libc SHA256 functions; make this work when compiled

!WITH_OPENSSL

OpenBSD-Regress-ID: fda0764c1097cd42f979ace29b07eb3481259890

3 years agoupstream: Add test for ssh hashed known_hosts handling.
dtucker@openbsd.org [Fri, 1 Oct 2021 05:20:20 +0000 (05:20 +0000)] 
upstream: Add test for ssh hashed known_hosts handling.

OpenBSD-Regress-ID: bcef3b3cd5a1ad9899327b4b2183de2541aaf9cf

3 years agofix broken OPENSSL_HAS_ECC test
Damien Miller [Wed, 6 Oct 2021 02:16:21 +0000 (13:16 +1100)] 
fix broken OPENSSL_HAS_ECC test

spotted by dtucker

3 years agomake sk-dummy.so work without libcrypto installed
Damien Miller [Fri, 1 Oct 2021 12:40:06 +0000 (22:40 +1000)] 
make sk-dummy.so work without libcrypto installed

3 years agomake OPENSSL_HAS_ECC checks more thorough
Damien Miller [Fri, 1 Oct 2021 06:35:49 +0000 (16:35 +1000)] 
make OPENSSL_HAS_ECC checks more thorough

ok dtucker

3 years agofix FIDO key support for !OPENSSL_HAS_ECC case
Damien Miller [Fri, 1 Oct 2021 06:35:05 +0000 (16:35 +1000)] 
fix FIDO key support for !OPENSSL_HAS_ECC case

ok dtucker

3 years agoenable security key support for --without-openssl
Damien Miller [Fri, 1 Oct 2021 04:51:37 +0000 (14:51 +1000)] 
enable security key support for --without-openssl