Commit Graph

11315 Commits

Author SHA1 Message Date
djm@openbsd.org 2344750250 upstream: After years of forewarning, disable the RSA/SHA-1
signature algorithm by default. It is feasible to create colliding SHA1
hashes, so we need to deprecate its use.

RSA/SHA-256/512 remains available and will be transparently selected
instead of RSA/SHA1 for most SSH servers released in the last five+
years. There is no need to regenerate RSA keys.

The use of RSA/SHA1 can be re-enabled by adding "ssh-rsa" to the
PubkeyAcceptedAlgorithms directives on the client and server.

ok dtucker deraadt

OpenBSD-Commit-ID: 189bcc4789c7254e09e23734bdd5def8354ff1d5
2021-08-30 09:58:15 +10:00
djm@openbsd.org 56c4455d3b upstream: wrap at 80 columns
OpenBSD-Commit-ID: 47ca2286d6b52a9747f34da16d742879e1a37bf0
2021-08-30 09:58:15 +10:00
Darren Tucker 95401eea85 Replace shell function with ssh-keygen -A.
Prevents the init script in the SysV package from trying (and failing)
to generate unsupported key types.  Remove now-unused COMMENT_OUT_ECC.
ok tim@
2021-08-20 18:14:13 +10:00
Darren Tucker d83ec9ed99 Remove obsolete Redhat PAM config and init script. 2021-08-20 15:39:05 +10:00
Damien Miller e1a596186c depend 2021-08-20 14:03:49 +10:00
Damien Miller 5450606c8f update version numbers 2021-08-20 13:59:43 +10:00
djm@openbsd.org feee2384ab upstream: openssh-8.7
OpenBSD-Commit-ID: 8769dff0fd76ae3193d77bf83b439adee0f300cd
2021-08-20 13:26:52 +10:00
Darren Tucker 9a2ed62173 Also check pid in pselect_notify_setup.
Spotted by djm@.
2021-08-20 10:48:13 +10:00
Darren Tucker deaadcb93c Prefix pselect functions to clarify debug messages 2021-08-20 08:39:33 +10:00
Darren Tucker 10e45654cf Fix race in pselect replacement code.
On the second and subsequent calls to pselect the notify_pipe was not
added to the select readset, opening up a race that om G. Christensen
discovered on multiprocessor Solaris <=9 systems.

Also reinitialize notify_pipe if the pid changes.  This will prevent a
parent and child from using the same FD, although this is not an issue
in the current structure it might be in future.
2021-08-20 08:30:42 +10:00
Darren Tucker 464ba22f1e Check compiler for c99 declarations after code.
The sntrup761 reference code contains c99-style declarations after code
so don't try to build that if the compiler doesn't support it.
2021-08-18 12:51:30 +10:00
Darren Tucker 7d878679a4 Remove trailing backslash on regress-unit-binaries 2021-08-17 15:12:04 +10:00
Darren Tucker b71b2508f1 Put stdint.h inside HAVE_STDINT_H.
From Tom G. Christensen.
2021-08-17 07:59:27 +10:00
Darren Tucker 6a24567a29 Improve github test driver script.
- use a trap to always output any failed regress logs (since the script
   sets -e, the existing log output is never invoked).
 - pass LTESTS and SKIP_LTESTS when re-running with sshd options (eg.
   UsePAM).
2021-08-16 14:42:48 +10:00
Darren Tucker b467cf1370 Remove deprecated ubuntu-16.04 test targets.
Github has deprecated ubuntu-16.04 and it will be removed on 20
September.
2021-08-16 11:32:23 +10:00
Darren Tucker 20e6eefcdf Skip agent ptrace test on hurd. 2021-08-15 23:25:26 +10:00
Darren Tucker 7c9115bbbf Add hurd test target. 2021-08-15 19:37:22 +10:00
Darren Tucker 7909a566f6 Skip scp3 tests on all dfly58 and 60 configs. 2021-08-15 12:45:10 +10:00
Tim Rice e65198e52c openbsd-compat/openbsd-compat.h: put bsd-signal.h before bsd-misc.h
to get sigset_t from signal.h needed for the pselect replacement.
2021-08-14 13:08:07 -07:00
Darren Tucker e50635640f Test OpenSSH from OpenBSD head on 6.8 and 6.9. 2021-08-13 13:21:00 +10:00
Darren Tucker e0ba38861c Skip scp3 test on dragonfly 58 and 60.
The tests hang, so skip until we figure them out.
2021-08-13 13:00:14 +10:00
djm@openbsd.org dcce2a2bcf upstream: mention that CASignatureAlgorithms accepts +/- similarly to
the other algorithm list directives; ok jmc bz#3335

OpenBSD-Commit-ID: 0d46b53995817052c78e2dce9dbd133963b073d9
2021-08-13 10:01:15 +10:00
schwarze@openbsd.org 090a82486e upstream: In the editline(3) branch of the sftp(1) event loop,
handle SIGINT rather than ignoring it, such that the user can use Ctrl-C to
discard the currently edited command line and get a fresh prompt, just like
in ftp(1), bc(1), and in shells.

It is critical to not use ssl_signal() for this particular case
because that function unconditionally sets SA_RESTART, but here we
need the signal to interrupt the read(2) in the el_gets(3) event loop.

OK dtucker@ deraadt@

OpenBSD-Commit-ID: 8025115a773f52e9bb562eaab37ea2e021cc7299
2021-08-12 23:05:33 +10:00
naddy@openbsd.org e1371e4f58 upstream: scp: tweak man page and error message for -3 by default
Now that the -3 option is enabled by default, flip the documentation
and error message logic from "requires -3" to "blocked by -R".

ok djm@

OpenBSD-Commit-ID: a872592118444fb3acda5267b2a8c3d4c4252020
2021-08-12 23:03:13 +10:00
naddy@openbsd.org 49f46f6d77 upstream: scp: do not spawn ssh with two -s flags for
remote-to-remote copies

Do not add another "-s" to the argument vector every time an SFTP
connection is initiated.  Instead, introduce a subsystem flag to
do_cmd() and add "-s" when the flag is set.

ok djm@

OpenBSD-Commit-ID: 25df69759f323661d31b2e1e790faa22e27966c1
2021-08-12 23:03:13 +10:00
djm@openbsd.org 2a2cd00783 upstream: test -Oprint-pubkey
OpenBSD-Regress-ID: 3d51afb6d1f287975fb6fddd7a2c00a3bc5094e0
2021-08-11 18:56:35 +10:00
djm@openbsd.org b9f4635ea5 upstream: when verifying sshsig signatures, support an option
(-Oprint-pubkey) to dump the full public key to stdout; based on patch from
Fabian Stelzer; ok markus@

OpenBSD-Commit-ID: 0598000e5b9adfb45d42afa76ff80daaa12fc3e2
2021-08-11 18:56:29 +10:00
djm@openbsd.org 750c1a45ba upstream: oops, missed one more %p
OpenBSD-Commit-ID: e7e62818d1564cc5cd9086eaf7a51cbd1a9701eb
2021-08-11 18:37:30 +10:00
djm@openbsd.org b5aa27b69a upstream: remove a bunch of %p in format strings; leftovers of
debuggings past. prompted by Michael Forney, ok dtucker@

OpenBSD-Commit-ID: 4853a0d6c9cecaba9ecfcc19066e52d3a8dcb2ac
2021-08-11 18:37:30 +10:00
Darren Tucker 419aa01123 Add includes.h to compat tests.
On platforms where closefrom returns void (eg glibc>=2.34) the prototype
for closefrom in its compat tests would cause compile errors.  Remove
this and have the tests pull in the compat headers in the same way as
the main code.  bz#3336.
2021-08-11 09:21:09 +10:00
djm@openbsd.org 931f592f26 upstream: adapt to scp -M flag change; make scp3.sh test SFTP mode too
OpenBSD-Regress-ID: 43fea26704a0f0b962b53c1fabcb68179638f9c0
2021-08-10 13:37:27 +10:00
djm@openbsd.org 391ca67fb9 upstream: Prepare for a future where scp(1) uses the SFTP protocol by
default. Replace recently added -M option to select the protocol with -O
(olde) and -s (SFTP) flags, and label the -s flag with a clear warning that
it will be removed in the near future (so no, don't use it in scripts!).

prompted by/feedback from deraadt@

OpenBSD-Commit-ID: 92ad72cc6f0023c9be9e316d8b30eb6d8d749cfc
2021-08-10 13:37:20 +10:00
djm@openbsd.org bfdd4b722f upstream: make scp -3 the default for remote-to-remote copies. It
provides a much better and more intuitive user experience and doesn't require
exposing credentials to the source host.

thanks naddy@ for catching the missing argument in usage()

"Yes please!" - markus@
"makes a lot of sense" - deraadt@
"the right thing to do" - dtucker@

OpenBSD-Commit-ID: d0d2af5f0965c5192ba5b2fa461c9f9b130e5dd9
2021-08-10 12:47:46 +10:00
djm@openbsd.org 2f7a3b51ce upstream: make scp in SFTP mode try to use relative paths as much
as possible. Previosuly, it would try to make relative and ~/-rooted paths
absolute before requesting transfers.

prompted by and much discussion deraadt@
ok markus@

OpenBSD-Commit-ID: 46639d382ea99546a4914b545fa7b00fa1be5566
2021-08-10 12:47:46 +10:00
djm@openbsd.org 2ab864010e upstream: SFTP protocol extension to allow the server to expand
~-prefixed paths, in particular ~user ones. Allows scp in sftp mode to accept
these paths, like scp in rcp mode does.

prompted by and much discussion deraadt@
ok markus@

OpenBSD-Commit-ID: 7d794def9e4de348e1e777f6030fc9bafdfff392
2021-08-10 12:47:46 +10:00
djm@openbsd.org 41b019ac06 upstream: when scp is in SFTP mode, try to deal better with ~
prefixed paths. ~user paths aren't supported, but ~/ paths will be accepted
and prefixed with the SFTP server starting directory (more to come)

prompted by and discussed with deraadt@
ok markus@

OpenBSD-Commit-ID: 263a071f14555c045fd03132a8fb6cbd983df00d
2021-08-10 12:47:45 +10:00
djm@openbsd.org b4b3f3da6c upstream: on fatal errors, make scp wait for ssh connection before
exiting avoids LogLevel=verbose (or greater) messages from ssh appearing
after scp has returned exited and control has returned to the shell; ok
markus@

(this was originally committed as r1.223 along with unrelated stuff that
I rolled back in r1.224)

OpenBSD-Commit-ID: 1261fd667ad918484889ed3d7aec074f3956a74b
2021-08-10 12:47:45 +10:00
djm@openbsd.org 2ae7771749 upstream: rever r1.223 - I accidentally committed unrelated changes
OpenBSD-Commit-ID: fb73f3865b2647a27dd94db73d6589506a9625f9
2021-08-10 12:47:45 +10:00
djm@openbsd.org 986abe94d4 upstream: show only the final path component in the progress meter;
more useful with long paths (that may truncate) and better matches
traditional scp behaviour; spotted by naddy@ ok deraadt@

OpenBSD-Commit-ID: 26b544d0074f03ebb8a3ebce42317d8d7ee291a3
2021-08-10 12:47:39 +10:00
djm@openbsd.org 2b67932bb3 upstream: on fatal errors, make scp wait for ssh connection before
exiting avoids LogLevel=verbose (or greater) messages from ssh appearing
after scp has returned exited and control has returned to the shell; ok
markus@

OpenBSD-Commit-ID: ef9dab5ef5ae54a6a4c3b15d380568e94263456c
2021-08-10 12:47:39 +10:00
dtucker@openbsd.org 724eb900ac upstream: xstrdup environment variable used by ForwardAgent. bz#3328
from goetze at dovetail.com, ok djm@ deraadt@

OpenBSD-Commit-ID: 760320dac1c3b26904284ba417a7d63fccc5e742
2021-08-08 19:14:51 +10:00
dtucker@openbsd.org 86b4cb3a88 upstream: Although it's POSIX, not all shells used in Portable support
the implicit 'in "$@"' after 'for i'.

OpenBSD-Regress-ID: 3c9aec6bca4868f85d2742b6ba5223fce110bdbc
2021-08-08 18:43:41 +10:00
Darren Tucker f2ccf6c9f3 Move portable specific settings down.
This brings the top hunk of the file back in sync with OpenBSD
so patches to the CVS Id should apply instead of always being
rejected.
2021-08-08 17:39:56 +10:00
dtucker@openbsd.org 71b0eb997e upstream: Move setting of USER further down the startup In portable
we have to change this and having it in the same hunk as the CVS Id string
means applying changes fails every. single. time.

OpenBSD-Regress-ID: 87cd603eb6db58c9b430bf90adacb7f90864429b
2021-08-08 17:35:45 +10:00
dtucker@openbsd.org f0aca2706c upstream: Drop -q in ssh-log-wrapper.sh to preserve logs.
scp and sftp like to add -q to the command line passed to ssh which
overrides the LogLevel we set in the config files and suppresses output
to the debug logs so drop any "-q" from the invoked ssh.  In the one
case where we actually want to use -q in the banner test, call the ssh
binary directly bypassing the logging wrapper.

OpenBSD-Regress-ID: e2c97d3c964bda33a751374c56f65cdb29755b75
2021-08-08 17:19:56 +10:00
dtucker@openbsd.org cf27810a64 upstream: Fix prototype mismatch for do_cmd. ok djm@
OpenBSD-Commit-ID: 1c1598bb5237a7ae0be99152f185e0071163714d
2021-08-07 12:11:03 +10:00
djm@openbsd.org 85de69f646 upstream: sftp-client.c needs poll.h
remove unused variable

OpenBSD-Commit-ID: 233ac6c012cd23af62f237167a661db391055a16
2021-08-07 11:57:13 +10:00
Darren Tucker 397c4d72e5 Include poll.h and friends for struct pollfd. 2021-08-07 11:30:57 +10:00
djm@openbsd.org a9e2c53319 upstream: do_upload() used a near-identical structure for
tracking expected status replies from the server to what do_download() was
using.

Refactor it to use the same structure and factor out some common
code into helper functions.

OpenBSD-Commit-ID: 0c167df8ab6df4a5292c32421922b0cf379e9054
2021-08-07 10:20:31 +10:00
djm@openbsd.org 7b1cbcb759 upstream: make scp(1) in SFTP mode follow symlinks like
traditional scp(1) ok markus@

OpenBSD-Commit-ID: 97255e55be37e8e26605e4ba1e69f9781765d231
2021-08-07 10:20:31 +10:00