]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
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.

4 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)

4 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

4 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

4 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

4 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

4 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

4 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

4 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.

4 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@

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

4 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@

4 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

4 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

4 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

4 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.

4 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.

4 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

4 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

4 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

4 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

4 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

4 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.

4 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.

4 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.

4 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.

4 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.

4 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.

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

4 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

4 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

4 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.

4 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

4 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.

4 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.

4 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.

4 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.

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 years agoneed stdlib.h for free(3)
Damien Miller [Fri, 1 Oct 2021 03:27:50 +0000 (13:27 +1000)] 
need stdlib.h for free(3)

4 years agoupstream: Fix up whitespace left by previous
dtucker@openbsd.org [Thu, 30 Sep 2021 05:26:26 +0000 (05:26 +0000)] 
upstream: Fix up whitespace left by previous

change removing privsep.  No other changes.

OpenBSD-Regress-ID: 87adec225d8afaee4d6a91b2b71203f52bf14b15

4 years agoupstream: Remove references to privsep.
dtucker@openbsd.org [Thu, 30 Sep 2021 05:20:08 +0000 (05:20 +0000)] 
upstream: Remove references to privsep.

This removes several do..while loops but does not change the
indentation of the now-shallower loops, which will be done in a separate
whitespace-only commit to keep changes of style and substance separate.

OpenBSD-Regress-ID: 4bed1a0249df7b4a87c965066ce689e79472a8f7

4 years agoupstream: Use "skip" instead of "fatal"
dtucker@openbsd.org [Thu, 30 Sep 2021 04:22:50 +0000 (04:22 +0000)] 
upstream: Use "skip" instead of "fatal"

if SUDO isn't set for the *-command tests. This means running "make tests"
without SUDO set will perform all of the tests that it can instead of
failing on the ones it cannot run.

OpenBSD-Regress-ID: bd4dbbb02f34b2e8c890558ad4a696248def763a

4 years agoupstream: unbreak FIDO sk-ed25519 key enrollment for OPENSSL=no builds;
djm@openbsd.org [Fri, 1 Oct 2021 04:50:36 +0000 (04:50 +0000)] 
upstream: unbreak FIDO sk-ed25519 key enrollment for OPENSSL=no builds;

ok dtucker@

OpenBSD-Commit-ID: 6323a5241728626cbb2bf0452cf6a5bcbd7ff709

4 years agoInclude stdlib.h for arc4random_uniform prototype.
Darren Tucker [Wed, 29 Sep 2021 10:03:58 +0000 (20:03 +1000)] 
Include stdlib.h for arc4random_uniform prototype.

4 years agoLook for clang after cc and gcc.
Darren Tucker [Wed, 29 Sep 2021 10:00:30 +0000 (20:00 +1000)] 
Look for clang after cc and gcc.

4 years agoUse backticks instead of $(..) for portability.
Darren Tucker [Wed, 29 Sep 2021 09:30:59 +0000 (19:30 +1000)] 
Use backticks instead of $(..) for portability.

Older shells (eg /bin/sh on Solaris 10) don't support $() syntax.

4 years agoSkip file-based tests by default on Mac OS.
Darren Tucker [Wed, 29 Sep 2021 08:53:32 +0000 (18:53 +1000)] 
Skip file-based tests by default on Mac OS.

The file-based tests need OpenSSL so skip them.

4 years agoBuild without OpenSSL on Mac OS.
Darren Tucker [Wed, 29 Sep 2021 08:42:47 +0000 (18:42 +1000)] 
Build without OpenSSL on Mac OS.

Modern versions don't ship enough libcrypto to build against.

4 years agoRemove TEST_SSH_ECC.
Darren Tucker [Wed, 29 Sep 2021 08:33:38 +0000 (18:33 +1000)] 
Remove TEST_SSH_ECC.

Convert the only remaining user of it to runtime detection using ssh -Q.

4 years agoSplit c89 test openssl setting out.
Darren Tucker [Wed, 29 Sep 2021 07:48:09 +0000 (17:48 +1000)] 
Split c89 test openssl setting out.

4 years agoExpand TEST_SHELL consistently with other vars.
Darren Tucker [Wed, 29 Sep 2021 07:40:50 +0000 (17:40 +1000)] 
Expand TEST_SHELL consistently with other vars.

4 years agoReplace `pwd` with make variable in regress cmd.
Darren Tucker [Wed, 29 Sep 2021 07:26:50 +0000 (17:26 +1000)] 
Replace `pwd` with make variable in regress cmd.

4 years agoGet BUILDDIR from autoconf.
Darren Tucker [Wed, 29 Sep 2021 07:14:33 +0000 (17:14 +1000)] 
Get BUILDDIR from autoconf.

Use this to replace `pwd`s in regress test command line.

4 years agoAdd make clean step to tests.
Darren Tucker [Wed, 29 Sep 2021 03:28:56 +0000 (13:28 +1000)] 
Add make clean step to tests.

4 years agoTest all available clang and gcc versions.
Darren Tucker [Wed, 29 Sep 2021 01:36:13 +0000 (11:36 +1000)] 
Test all available clang and gcc versions.

4 years agoupstream: Test certificate hostkeys held in ssh-agent too. Would have
djm@openbsd.org [Wed, 29 Sep 2021 01:32:21 +0000 (01:32 +0000)] 
upstream: Test certificate hostkeys held in ssh-agent too. Would have

caught regression fixed in sshd r1.575

ok markus@

OpenBSD-Regress-ID: 1f164d7bd89f83762db823eec4ddf2d2556145ed

4 years agoupstream: add some debug output showing how many key file/command lines
djm@openbsd.org [Wed, 29 Sep 2021 01:33:32 +0000 (01:33 +0000)] 
upstream: add some debug output showing how many key file/command lines

were processed. Useful to see whether a file or command actually has keys
present

OpenBSD-Commit-ID: 0bd9ff94e84e03a22df8e6c12f6074a95d27f23c

4 years agoupstream: Make prototype for rijndaelEncrypt match function
dtucker@openbsd.org [Tue, 28 Sep 2021 11:14:50 +0000 (11:14 +0000)] 
upstream: Make prototype for rijndaelEncrypt match function

including the bounds. Fixes error in portable where GCC>=11 takes notice of
the bounds. ok deraadt@

OpenBSD-Commit-ID: cdd2f05fd1549e1786a70871e513cf9e9cf099a6

4 years agoupstream: Import regenerated moduli.
dtucker@openbsd.org [Tue, 28 Sep 2021 11:10:05 +0000 (11:10 +0000)] 
upstream: Import regenerated moduli.

OpenBSD-Commit-ID: 4bec5db13b736b64b06a0fca704cbecc2874c8e1

4 years agoAdd new compiler hardening flags.
Darren Tucker [Wed, 29 Sep 2021 00:53:55 +0000 (10:53 +1000)] 
Add new compiler hardening flags.

Add -fzero-call-used-regs and -ftrivial-auto-var-init to the list of
compiler hardening flags that configure checks for.  These are supported
by clang and gcc, and make ROP gadgets less useful and mitigate
stack-based infoleaks respectively.  ok djm@

4 years agoinitgroups needs grp.h V_8_8 anongit/V_8_8 github-selfhosted/V_8_8 github/V_8_8 V_8_8_P1
Damien Miller [Sun, 26 Sep 2021 14:03:19 +0000 (00:03 +1000)] 
initgroups needs grp.h

4 years agoupstream: openssh-8.8
djm@openbsd.org [Sun, 26 Sep 2021 14:01:11 +0000 (14:01 +0000)] 
upstream: openssh-8.8

OpenBSD-Commit-ID: 12357794602ac979eb7312a1fb190c453f492ec4

4 years agoupstream: need initgroups() before setresgid(); reported by anton@,
djm@openbsd.org [Sun, 26 Sep 2021 14:01:03 +0000 (14:01 +0000)] 
upstream: need initgroups() before setresgid(); reported by anton@,

ok deraadt@

OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce

4 years agoupdate version numbers for release
Damien Miller [Sun, 26 Sep 2021 12:16:36 +0000 (22:16 +1000)] 
update version numbers for release

4 years agoupstream: RSA/SHA-1 is not used by default anymore
kn@openbsd.org [Sat, 25 Sep 2021 09:40:33 +0000 (09:40 +0000)] 
upstream: RSA/SHA-1 is not used by default anymore

OK dtucker deraadt djm

OpenBSD-Commit-ID: 055c51a221c3f099dd75c95362f902da1b8678c6

4 years agoMove the fgrep replacement to hostkey-rotate.sh.
Darren Tucker [Fri, 24 Sep 2021 01:08:03 +0000 (11:08 +1000)] 
Move the fgrep replacement to hostkey-rotate.sh.

The fgrep replacement for buggy greps doesn't work in the sftp-glob test
so move it to just where we know it's needed.

4 years agoReplacement function for buggy fgrep.
Darren Tucker [Thu, 23 Sep 2021 22:04:14 +0000 (08:04 +1000)] 
Replacement function for buggy fgrep.

GNU (f)grep <=2.18, as shipped by FreeBSD<=12 and NetBSD<=9 will
occasionally fail to find ssh host keys in the hostkey-rotate test.
If we have those versions, use awk instead.

4 years agoDon't prompt for yes/no questions.
David Manouchehri [Thu, 23 Sep 2021 21:03:18 +0000 (17:03 -0400)] 
Don't prompt for yes/no questions.

4 years agoupstream: fix missing -s in SYNOPSYS and usage() as well as a
djm@openbsd.org [Mon, 20 Sep 2021 06:53:56 +0000 (06:53 +0000)] 
upstream: fix missing -s in SYNOPSYS and usage() as well as a

capitalisation mistake; spotted by jmc@

OpenBSD-Commit-ID: 0ed8ee085c7503c60578941d8b45f3a61d4c9710

4 years agoupstream: Fix "Allocated port" debug message
dtucker@openbsd.org [Mon, 20 Sep 2021 04:02:13 +0000 (04:02 +0000)] 
upstream: Fix "Allocated port" debug message

for unix domain sockets. From peder.stray at gmail.com via github PR#272,
ok deraadt@

OpenBSD-Commit-ID: 8d5ef3fbdcdd29ebb0792b5022a4942db03f017e

4 years agoupstream: Switch scp back to use the old protocol by default, ahead of
djm@openbsd.org [Mon, 20 Sep 2021 01:55:42 +0000 (01:55 +0000)] 
upstream: Switch scp back to use the old protocol by default, ahead of

release. We'll wait a little longer for people to pick up sftp-server(8) that
supports the extension that scp needs for ~user paths to continue working in
SFTP protocol mode. Discussed with deraadt@

OpenBSD-Commit-ID: f281f603a705fba317ff076e7b11bcf2df941871

4 years agoupstream: better error message for ~user failures when the
djm@openbsd.org [Sat, 18 Sep 2021 02:03:25 +0000 (02:03 +0000)] 
upstream: better error message for ~user failures when the

sftp-server lacks the expand-path extension; ok deraadt@

OpenBSD-Commit-ID: 9c1d965d389411f7e86f0a445158bf09b8f9e4bc

4 years agoupstream: make some more scp-in-SFTP mode better match Unix idioms
djm@openbsd.org [Thu, 16 Sep 2021 15:22:22 +0000 (15:22 +0000)] 
upstream: make some more scp-in-SFTP mode better match Unix idioms

suggested by deraadt@

OpenBSD-Commit-ID: 0f2439404ed4cf0b0be8bf49a1ee734836e1ac87

4 years agoupstream: allow log_stderr==2 to prefix log messages with argv[0]
djm@openbsd.org [Thu, 16 Sep 2021 15:11:19 +0000 (15:11 +0000)] 
upstream: allow log_stderr==2 to prefix log messages with argv[0]

use this to make scp's SFTP mode error messages more scp-like

prompted by and ok deraadt@

OpenBSD-Commit-ID: 0e821dbde423fc2280e47414bdc22aaa5b4e0733

4 years agoTest against LibreSSL 3.2.6, 3.3.4, 3.4.0.
Darren Tucker [Fri, 17 Sep 2021 03:03:31 +0000 (13:03 +1000)] 
Test against LibreSSL 3.2.6, 3.3.4, 3.4.0.

4 years agoupstream: missing space character in ssh -G output broke the
djm@openbsd.org [Thu, 16 Sep 2021 05:36:03 +0000 (05:36 +0000)] 
upstream: missing space character in ssh -G output broke the

t-sshcfgparse regression test; spotted by anton@

OpenBSD-Commit-ID: bcc36fae2f233caac4baa8e58482da4aa350eed0

4 years agoupstream: allow CanonicalizePermittedCNAMEs=none in ssh_config; ok
djm@openbsd.org [Wed, 15 Sep 2021 06:56:01 +0000 (06:56 +0000)] 
upstream: allow CanonicalizePermittedCNAMEs=none in ssh_config; ok

markus@

OpenBSD-Commit-ID: 668a82ba8e56d731b26ffc5703213bfe071df623

4 years agoupstream: put back the mux_ctx memleak fix for SSH_CHANNEL_MUX_CLIENT
mbuhl@openbsd.org [Tue, 14 Sep 2021 11:04:21 +0000 (11:04 +0000)] 
upstream: put back the mux_ctx memleak fix for SSH_CHANNEL_MUX_CLIENT

OK mfriedl@

OpenBSD-Commit-ID: 1aba1da828956cacaadb81a637338734697d9798

4 years agoupstream: Do not ignore SIGINT while waiting for input if editline(3)
schwarze@openbsd.org [Sat, 11 Sep 2021 09:05:50 +0000 (09:05 +0000)] 
upstream: Do not ignore SIGINT while waiting for input if editline(3)

is not used. Instead, in non-interactive mode, exit sftp(1), like for other
serious errors. As pointed out by dtucker@, when compiled without editline(3)
support in portable OpenSSH, the el == NULL branch is also used for
interactive mode. In that case, discard the input line and provide a fresh
prompt to the user just like in the case where editline(3) is used. OK djm@

OpenBSD-Commit-ID: 7d06f4d3ebba62115527fafacf38370d09dfb393

4 years agoupstream: when using SFTP protocol, continue transferring files after a
djm@openbsd.org [Sat, 11 Sep 2021 00:40:24 +0000 (00:40 +0000)] 
upstream: when using SFTP protocol, continue transferring files after a

transfer error occurs. This matches original scp/rcp behaviour. ok dtucker@

OpenBSD-Commit-ID: dfe4558d71dd09707e9b5d6e7d2e53b793da69fa

4 years agoupstream: Document that non-interactive commands are run via the user's
dtucker@openbsd.org [Fri, 10 Sep 2021 11:38:38 +0000 (11:38 +0000)] 
upstream: Document that non-interactive commands are run via the user's

shell using the -c flag.  ok jmc@

OpenBSD-Commit-ID: 4f0d912077732eead10423afd1acf4fc0ceec477

4 years agoupstream: Document behaviour of arguments following non-interactive
dtucker@openbsd.org [Fri, 10 Sep 2021 10:26:02 +0000 (10:26 +0000)] 
upstream: Document behaviour of arguments following non-interactive

commands. Prompted by github PR#139 from EvanTheB, feedback & ok djm@ jmc@

OpenBSD-Commit-ID: fc758d1fe0471dfab4304fcad6cd4ecc3d79162a

4 years agoupstream: Clarify which file's attributes -p preserves, and that
dtucker@openbsd.org [Fri, 10 Sep 2021 07:11:11 +0000 (07:11 +0000)] 
upstream: Clarify which file's attributes -p preserves, and that

it's specifically the file mode bits. bz#3340 from calestyo at scientia.net,
ok djm@ jmc@

OpenBSD-Commit-ID: f09e6098ed1c4be00c730873049825f8ee7cb884

4 years agoupstream: openssh-7.4 was incorrectly listed twice; spotted by
djm@openbsd.org [Fri, 10 Sep 2021 05:46:09 +0000 (05:46 +0000)] 
upstream: openssh-7.4 was incorrectly listed twice; spotted by

Dmitry Belyavskiy, ok dtucker@

OpenBSD-Commit-ID: 4b823ae448f6e899927ce7b04225ac9e489f58ef

4 years agoupstream: - move CAVEATS to its correct order - use the term
jmc@openbsd.org [Thu, 9 Sep 2021 06:17:39 +0000 (06:17 +0000)] 
upstream: - move CAVEATS to its correct order - use the term

"legacy" protocol rather than "original", as the latter made the text
misleading - uppercase SCP

ok djm

OpenBSD-Commit-ID: 8479255746d5fa76a358ee59e7340fecf4245ff0

4 years agoDisable tracing on FreeBSD using procctl.
David Carlier [Wed, 8 Sep 2021 18:49:54 +0000 (19:49 +0100)] 
Disable tracing on FreeBSD using procctl.

Placed at the start of platform_disable_tracing() to prevent declaration
after code errors from strict C89 compilers (in the unlikely event that
more than one method is enabled).

4 years agoupstream: Use the SFTP protocol by default. The original scp/rcp
djm@openbsd.org [Wed, 8 Sep 2021 23:31:39 +0000 (23:31 +0000)] 
upstream: Use the SFTP protocol by default. The original scp/rcp

protocol remains available via the -O flag.

Note that ~user/ prefixed paths in SFTP mode require a protocol extension
that was first shipped in OpenSSH 8.7.

ok deraadt, after baking in snaps for a while without incident

OpenBSD-Commit-ID: 23588976e28c281ff5988da0848cb821fec9213c