]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
3 years agoupstream: Avoid an unnecessary xstrdup in rm_env() when matching
millert@openbsd.org [Wed, 20 Apr 2022 15:56:49 +0000 (15:56 +0000)] 
upstream: Avoid an unnecessary xstrdup in rm_env() when matching

patterns. Since match_pattern() doesn't modify its arguments (they are
const), there is no need to make an extra copy of the strings in
options->send_env. From Martin Vahlensieck

OpenBSD-Commit-ID: 2c9db31e3f4d3403b49642c64ee048b2a0a39351

3 years agoAdd debian-riscv64 test target.
Darren Tucker [Tue, 26 Apr 2022 13:30:59 +0000 (23:30 +1000)] 
Add debian-riscv64 test target.

3 years agoUpdate OpenSSL and LibreSSL versions in tests.
Darren Tucker [Mon, 25 Apr 2022 07:20:06 +0000 (17:20 +1000)] 
Update OpenSSL and LibreSSL versions in tests.

3 years agoInclude stdlib.h for free() prototype.
Darren Tucker [Sat, 23 Apr 2022 10:40:28 +0000 (20:40 +1000)] 
Include stdlib.h for free() prototype.

... which is used inside the CUSTOM_SYS_AUTH_GET_LASTLOGIN_MSG block.

3 years agoCache timezone data in capsicum sandbox.
Darren Tucker [Sat, 23 Apr 2022 10:17:26 +0000 (20:17 +1000)] 
Cache timezone data in capsicum sandbox.

From emaste at freebsd.org, originally part of FreeBSD commit r339216
fc3c19a9 with autoconf bits added by me.

3 years agoupstream: It looks like we can't completely avoid
dtucker@openbsd.org [Thu, 21 Apr 2022 01:36:46 +0000 (01:36 +0000)] 
upstream: It looks like we can't completely avoid

waiting for processes to exit so retrieve the pid via controlmaster and
use that.

OpenBSD-Regress-ID: 8246f00f22b14e49d2ff1744c94897ead33d457b

3 years agoupstream: Use ssh -f and ControlPersist ..
dtucker@openbsd.org [Wed, 20 Apr 2022 13:25:55 +0000 (13:25 +0000)] 
upstream: Use ssh -f and ControlPersist ..

to start up test forwards and ssh -O stop to shut them down intead of
sleep loops.  This speeds up the test by an order of magnitude.

OpenBSD-Regress-ID: eb3db5f805100919b092a3b2579c611fba3e83e7

3 years agoupstream: Simplify forward-control test.
dtucker@openbsd.org [Wed, 20 Apr 2022 05:24:13 +0000 (05:24 +0000)] 
upstream: Simplify forward-control test.

Since we no longer need to support SSH1 we don't need to run shell
commands on the other end of the connection and can use ssh -N instead.
This also makes the test less racy.

OpenBSD-Regress-ID: 32e94ce272820cc398f30b848b2b0f080d10302c

3 years agoupstream: regression test for sftp cp command
djm@openbsd.org [Thu, 31 Mar 2022 03:07:33 +0000 (03:07 +0000)] 
upstream: regression test for sftp cp command

OpenBSD-Regress-ID: c96bea9edde3a384b254785e7f9b2b24a81cdf82

3 years agoupstream: Import regenerated moduli
dtucker@openbsd.org [Wed, 20 Apr 2022 01:13:47 +0000 (01:13 +0000)] 
upstream: Import regenerated moduli

OpenBSD-Commit-ID: f9a0726d957cf10692a231996a1f34e7f9cdfeb0

3 years agoupstream: Try to continue running local I/O for channels in state
djm@openbsd.org [Wed, 20 Apr 2022 04:19:11 +0000 (04:19 +0000)] 
upstream: Try to continue running local I/O for channels in state

OPEN during SSH transport rekeying. The most visible benefit is that it
should make ~-escapes work in the client (e.g. to exit) if the connection
happened to have stalled during a rekey event. Based work by and ok dtucker@

OpenBSD-Commit-ID: a66e8f254e92edd4ce09c9f750883ec8f1ea5f45

3 years agoupstream: Import regenerated moduli
dtucker@openbsd.org [Wed, 20 Apr 2022 01:13:47 +0000 (01:13 +0000)] 
upstream: Import regenerated moduli

OpenBSD-Commit-ID: f9a0726d957cf10692a231996a1f34e7f9cdfeb0

3 years agoupstream: list the correct version number
tj@openbsd.org [Sat, 16 Apr 2022 00:22:31 +0000 (00:22 +0000)] 
upstream: list the correct version number

for when usage of the sftp protocol became default and fix a typo
from ed maste

OpenBSD-Commit-ID: 24e1795ed2283fdeacf16413c2f07503bcdebb31

3 years agoupstream: Correct path for system known hosts file in description
dtucker@openbsd.org [Tue, 12 Apr 2022 05:09:49 +0000 (05:09 +0000)] 
upstream: Correct path for system known hosts file in description

of IgnoreUserKnownHosts.  Patch from Martin Vahlensieck via tech@

OpenBSD-Commit-ID: 9b7784f054fa5aa4d63cb36bd563889477127215

3 years agoResync moduli.5 with upstream.
Darren Tucker [Sat, 16 Apr 2022 04:33:20 +0000 (14:33 +1000)] 
Resync moduli.5 with upstream.

1.18: remove duplicate publication year; carsten dot kunze at arcor dot de
1.19: ssh-keygen's -G/-T have been replaced with -M generate/screen.

3 years agoRetire fbsd6 test VM.
Darren Tucker [Sat, 16 Apr 2022 04:31:13 +0000 (14:31 +1000)] 
Retire fbsd6 test VM.

It's long since out of support, relatively slow (it's i686) and the
compiler has trouble with PIE.

3 years agoupstream: clear io_want/io_ready flags at start of poll() cycle;
djm@openbsd.org [Mon, 11 Apr 2022 22:52:08 +0000 (22:52 +0000)] 
upstream: clear io_want/io_ready flags at start of poll() cycle;

avoids plausible spin during rekeying if channel io_want flags are reused
across cycles. ok markus@ deraadt@

OpenBSD-Commit-ID: 91034f855b7c73cd2591657c49ac30f10322b967

3 years agoupstream: Note that curve25519-sha256 was later published in
dtucker@openbsd.org [Fri, 8 Apr 2022 05:43:39 +0000 (05:43 +0000)] 
upstream: Note that curve25519-sha256 was later published in

RFC8731.  ok djm@

OpenBSD-Commit-ID: 2ac2b5d642d4cf5918eaec8653cad9a4460b2743

3 years agoupstream: two defensive changes from Tobias Stoeckmann via GHPR287
djm@openbsd.org [Fri, 8 Apr 2022 04:40:40 +0000 (04:40 +0000)] 
upstream: two defensive changes from Tobias Stoeckmann via GHPR287

enforce stricter invarient for sshbuf_set_parent() - never allow
a buffer to have a previously-set parent changed.

In sshbuf_reset(), if the reallocation fails, then zero the entire
buffer and not the (potentially smaller) default initial alloc size.

OpenBSD-Commit-ID: 14583203aa5d50ad38d2e209ae10abaf8955e6a9

3 years agoRevert "update build-aux files to match autoconf-2.71"
Damien Miller [Mon, 11 Apr 2022 06:07:09 +0000 (16:07 +1000)] 
Revert "update build-aux files to match autoconf-2.71"

This reverts commit 0a8ca39fac6ad19096b6c263436f8b2dd51606f2.

It turns out that the checked-in copies of these files are actually newer
than autoconf-2.71's copies, so this was effectively a downgrade.
Spotted by Bo Anderson via github

3 years agoupdate build-aux files to match autoconf-2.71
Damien Miller [Fri, 8 Apr 2022 04:48:58 +0000 (14:48 +1000)] 
update build-aux files to match autoconf-2.71

i.e. config.guess, config.sub and install-sh

3 years agoupdate version numbers for release V_9_0_P1
Damien Miller [Wed, 6 Apr 2022 00:47:48 +0000 (10:47 +1000)] 
update version numbers for release

3 years agoupstream: openssh-9.0
djm@openbsd.org [Mon, 4 Apr 2022 22:45:25 +0000 (22:45 +0000)] 
upstream: openssh-9.0

OpenBSD-Commit-ID: 0dfb461188f4513ec024c1534da8c1ce14c20b64

3 years agoupstream: ssh: document sntrup761x25519-sha512@openssh.com as
naddy@openbsd.org [Thu, 31 Mar 2022 17:58:44 +0000 (17:58 +0000)] 
upstream: ssh: document sntrup761x25519-sha512@openssh.com as

default KEX

OpenBSD-Commit-ID: 12545bfa10bcbf552d04d9d9520d0f4e98b0e171

3 years agoupstream: man pages: add missing commas between subordinate and
naddy@openbsd.org [Thu, 31 Mar 2022 17:27:27 +0000 (17:27 +0000)] 
upstream: man pages: add missing commas between subordinate and

main clauses

jmc@ dislikes a comma before "then" in a conditional, so leave those
untouched.

ok jmc@

OpenBSD-Commit-ID: 9520801729bebcb3c9fe43ad7f9776ab4dd05ea3

3 years agoDisable security key on fbsd6 test host.
Darren Tucker [Mon, 4 Apr 2022 13:52:11 +0000 (23:52 +1000)] 
Disable security key on fbsd6 test host.

3 years agoSpecify TEST_SHELL=bash on AIX.
Darren Tucker [Mon, 4 Apr 2022 05:16:51 +0000 (15:16 +1000)] 
Specify TEST_SHELL=bash on AIX.

The system shells cause the agent-restrict test to fail due to some
quoting so explicitly specify bash until we can get configure to
autmatically work around that.

3 years agoOnly return events from ppoll that were requested.
Darren Tucker [Fri, 1 Apr 2022 12:38:44 +0000 (23:38 +1100)] 
Only return events from ppoll that were requested.

If the underlying system's select() returns bits that were not in the
request set, our ppoll() implementation can return revents for events
not requested, which can apparently cause a hang.  Only return revents
for activity in the requested event set.  bz#3416, analysis and fix by
yaroslav.kuzmin at vmssoftware com, ok djm@

3 years agoOnly run regression tests on slow VMs.
Darren Tucker [Fri, 1 Apr 2022 12:21:40 +0000 (23:21 +1100)] 
Only run regression tests on slow VMs.

3 years agoIncrease test timeout to allow slow VMs to finish
Darren Tucker [Fri, 1 Apr 2022 12:21:06 +0000 (23:21 +1100)] 
Increase test timeout to allow slow VMs to finish

3 years agoUse bash or ksh if available for SH in Makefile.
Darren Tucker [Fri, 1 Apr 2022 05:27:38 +0000 (16:27 +1100)] 
Use bash or ksh if available for SH in Makefile.

3 years agoSet Makefile SHELL as determined by configure.
Darren Tucker [Fri, 1 Apr 2022 03:56:54 +0000 (14:56 +1100)] 
Set Makefile SHELL as determined by configure.

This should improve compatibility for users with non-POSIX shells.  If
using Makefile.in directly (eg make -f Makefile.in distprep) then SHELL
will need to be specified on the command line (along with MANFMT in that
particular case).  ok djm@

3 years agoSkip slow tests on (very) slow test targets.
Darren Tucker [Fri, 1 Apr 2022 02:16:47 +0000 (13:16 +1100)] 
Skip slow tests on (very) slow test targets.

3 years agodepend
Damien Miller [Thu, 31 Mar 2022 03:11:36 +0000 (14:11 +1100)] 
depend

3 years agoupstream: add a sftp client "cp" command that supports server-side
djm@openbsd.org [Thu, 31 Mar 2022 03:07:03 +0000 (03:07 +0000)] 
upstream: add a sftp client "cp" command that supports server-side

copying of files. Useful for this task and for testing the copy-data
extension. Patch from Mike Frysinger; ok dtucker@

OpenBSD-Commit-ID: 1bb1b950af0d49f0d5425b1f267e197aa1b57444

3 years agoupstream: add support for the "corp-data" protocol extension to
djm@openbsd.org [Thu, 31 Mar 2022 03:05:49 +0000 (03:05 +0000)] 
upstream: add support for the "corp-data" protocol extension to

allow server-side copies to be performed without having to go via the client.
Patch by Mike Frysinger, ok dtucker@

OpenBSD-Commit-ID: 00aa510940fedd66dab1843b58682de4eb7156d5

3 years agoupstream: select post-quantum KEX
djm@openbsd.org [Wed, 30 Mar 2022 21:13:23 +0000 (21:13 +0000)] 
upstream: select post-quantum KEX

sntrup761x25519-sha512@openssh.com as the default; ok markus@

OpenBSD-Commit-ID: f02d99cbfce22dffec2e2ab1b60905fbddf48fb9

3 years agoupstream: fix poll() spin when a channel's output fd closes without
djm@openbsd.org [Wed, 30 Mar 2022 21:10:25 +0000 (21:10 +0000)] 
upstream: fix poll() spin when a channel's output fd closes without

data in the channel buffer. Introduce more exact packing of channel fds into
the pollfd array. fixes bz3405 and bz3411; ok deraadt@ markus@

OpenBSD-Commit-ID: 06740737849c9047785622ad5d472cb6a3907d10

3 years agoupstream: ssh is almost out of getopt() characters; note the
djm@openbsd.org [Wed, 30 Mar 2022 04:33:09 +0000 (04:33 +0000)] 
upstream: ssh is almost out of getopt() characters; note the

remaining remaining available ones in a comment

OpenBSD-Commit-ID: 48d38cef59d6bc8e84c6c066f6d601875d3253fd

3 years agoupstream: avoid NULL deref via ssh-keygen -Y find-principals.
djm@openbsd.org [Wed, 30 Mar 2022 04:27:51 +0000 (04:27 +0000)] 
upstream: avoid NULL deref via ssh-keygen -Y find-principals.

bz3409, reported by Mateusz Adamowski

OpenBSD-Commit-ID: a3b2c02438052ee858e0ee18e5a288586b5df2c5

3 years agoAdd AIX 5.1 test target.
Darren Tucker [Mon, 28 Mar 2022 06:51:03 +0000 (17:51 +1100)] 
Add AIX 5.1 test target.

3 years agoDrop leading "v" from release version identifier.
Darren Tucker [Sat, 26 Mar 2022 11:01:31 +0000 (22:01 +1100)] 
Drop leading "v" from release version identifier.

It's present in the git tags but not in the release tarball names.
Also drop extra "/" from URL path.

3 years agoUse tarballs when testing LibreSSL releases.
Darren Tucker [Sat, 26 Mar 2022 05:28:04 +0000 (16:28 +1100)] 
Use tarballs when testing LibreSSL releases.

This means they'll still work when the combination of -portable and
openbsd github repos no longer match.

3 years agoRemove now-unused passwd variable.
Darren Tucker [Sat, 26 Mar 2022 04:02:45 +0000 (15:02 +1100)] 
Remove now-unused passwd variable.

3 years agoMissing semicolon.
Darren Tucker [Sat, 26 Mar 2022 02:15:44 +0000 (13:15 +1100)] 
Missing semicolon.

3 years agoFactor out platform-specific locked account check.
Darren Tucker [Sat, 26 Mar 2022 01:49:50 +0000 (12:49 +1100)] 
Factor out platform-specific locked account check.

Also fixes an incorrect free on platforms with both libiaf and shadow
passwords (probably only Unixware).  Prompted by github PR#284,
originally from @c3h2_ctf and stoeckmann@.

3 years agoAdd OpenWRT mips and mipsel test targets.
Darren Tucker [Fri, 25 Mar 2022 21:13:46 +0000 (08:13 +1100)] 
Add OpenWRT mips and mipsel test targets.

3 years agoupstream: don't leak argument list; bz3404, reported by Balu
djm@openbsd.org [Sun, 20 Mar 2022 08:52:17 +0000 (08:52 +0000)] 
upstream: don't leak argument list; bz3404, reported by Balu

Gajjala ok dtucker@

OpenBSD-Commit-ID: fddc32d74e5dd5cff1a49ddd6297b0867eae56a6

3 years agoupstream: make addargs() and replacearg() a little more robust and
djm@openbsd.org [Sun, 20 Mar 2022 08:51:21 +0000 (08:51 +0000)] 
upstream: make addargs() and replacearg() a little more robust and

improve error reporting

make freeargs(NULL) a noop like the other free functions

ok dtucker as part of bz3403

OpenBSD-Commit-ID: 15f86da83176978b4d1d288caa24c766dfa2983d

3 years agoupstream: don't try to resolve ListenAddress directives in the sshd
djm@openbsd.org [Fri, 18 Mar 2022 04:04:11 +0000 (04:04 +0000)] 
upstream: don't try to resolve ListenAddress directives in the sshd

re-exec path - we're never going to use the result and if the operation fails
then it can prevent connections from being accepted. Reported by Aaron
Poffenberger; with / ok dtucker@

OpenBSD-Commit-ID: 44c53a43909a328e2f5ab26070fdef3594eded60

3 years agoupstream: remove blank line
djm@openbsd.org [Fri, 18 Mar 2022 02:50:21 +0000 (02:50 +0000)] 
upstream: remove blank line

OpenBSD-Commit-ID: d5e0182965b2fbfb03ad5f256d1a1ce5706bcddf

3 years agoupstream: helpful comment
djm@openbsd.org [Fri, 18 Mar 2022 02:32:22 +0000 (02:32 +0000)] 
upstream: helpful comment

OpenBSD-Commit-ID: e3315a45cb04e7feeb614d76ec80a9fe4ca0e8c7

3 years agoupstream: ssh-keygen -Y check-novalidate requires namespace or SEGV
djm@openbsd.org [Fri, 18 Mar 2022 02:31:25 +0000 (02:31 +0000)] 
upstream: ssh-keygen -Y check-novalidate requires namespace or SEGV

will ensue. Patch from Mateusz Adamowski via GHPR#307

OpenBSD-Commit-ID: 99e8ec38f9feb38bce6de240335be34aedeba5fd

3 years agoupstream: improve DEBUG_CHANNEL_POLL debugging message
djm@openbsd.org [Tue, 15 Mar 2022 05:27:37 +0000 (05:27 +0000)] 
upstream: improve DEBUG_CHANNEL_POLL debugging message

OpenBSD-Commit-ID: 2275eb7bc4707d019b1a0194b9c92c0b78da848f

3 years agoupstream: ssh: xstrdup(): use memcpy(3)
cheloha@openbsd.org [Sun, 13 Mar 2022 23:27:54 +0000 (23:27 +0000)] 
upstream: ssh: xstrdup(): use memcpy(3)

Copying the given string into the buffer with strlcpy(3) confers no
benefit in this context because we have already determined the
string's length with strlen(3) in order to allocate that buffer.

Thread: https://marc.info/?l=openbsd-tech&m=164687525802691&w=2

ok dtucker@ millert@

OpenBSD-Commit-ID: f8bfc082e36e2d2dc4e1feece02fe274155ca11a

3 years agoResync fmt_scaled. with OpenBSD.
Darren Tucker [Fri, 11 Mar 2022 07:43:58 +0000 (18:43 +1100)] 
Resync fmt_scaled. with OpenBSD.

Fixes underflow reported in bz#3401.

3 years agoProvide killpg implementation.
Darren Tucker [Tue, 8 Mar 2022 22:41:56 +0000 (09:41 +1100)] 
Provide killpg implementation.

Based on github PR#301 for Tandem NonStop.

3 years agoCheck for missing ftruncate prototype.
Darren Tucker [Tue, 8 Mar 2022 22:29:30 +0000 (09:29 +1100)] 
Check for missing ftruncate prototype.

From github PR#301 in conjunction with rsbeckerca.

3 years agoDefault to not using sandbox when cross compiling.
Darren Tucker [Tue, 8 Mar 2022 09:04:06 +0000 (20:04 +1100)] 
Default to not using sandbox when cross compiling.

On most systems poll(2) does not work when the number of FDs is reduced
with setrlimit, so assume it doesn't when cross compiling and we can't
run the test.  bz#3398.

3 years agoupstream: pack pollfd array before server_accept_loop() ppoll()
djm@openbsd.org [Tue, 1 Mar 2022 01:59:19 +0000 (01:59 +0000)] 
upstream: pack pollfd array before server_accept_loop() ppoll()

call, and terminate sshd if ppoll() returns errno==EINVAL

avoids spin in ppoll when MaxStartups > RLIMIT_NOFILE, reported by
Daniel Micay

feedback/ok deraadt

OpenBSD-Commit-ID: dbab1c24993ac977ec24d83283b8b7528f7c2c15

3 years agoupstream: include rejected signature algorithm in error message and
naddy@openbsd.org [Sun, 27 Feb 2022 01:33:59 +0000 (01:33 +0000)] 
upstream: include rejected signature algorithm in error message and

not the (useless) key type; ok djm@

OpenBSD-Commit-ID: d0c0f552a4d9161203e07e95d58a76eb602a76ff

3 years agoupstream: Remove the char * casts from arguments to do_lstat,
dtucker@openbsd.org [Fri, 25 Feb 2022 09:46:24 +0000 (09:46 +0000)] 
upstream: Remove the char * casts from arguments to do_lstat,

do_readdir and do_stat paths since the underlying functions now take a const
char *. Patch from vapier at gentoo.org.

OpenBSD-Commit-ID: 9e4d964dbfb0ed683a2a2900711b88e7f1c0297b

3 years agoupstream: save an unneccessary alloc/free, based on patch from
djm@openbsd.org [Fri, 25 Feb 2022 02:09:27 +0000 (02:09 +0000)] 
upstream: save an unneccessary alloc/free, based on patch from

Martin Vahlensieck; ok dtucker@

OpenBSD-Commit-ID: 90ffbf1f837e509742f2c31a1fbf2c0fd376fd5f

3 years agoRemove unused ivbits argument from chacha_keysetup
Darren Tucker [Mon, 28 Feb 2022 22:02:06 +0000 (09:02 +1100)] 
Remove unused ivbits argument from chacha_keysetup

3 years agoAdd OPENBSD ORIGINAL marker.
Darren Tucker [Mon, 28 Feb 2022 22:00:20 +0000 (09:00 +1100)] 
Add OPENBSD ORIGINAL marker.

3 years agoNo unused param warnings for clang-12 and gcc-11.
Darren Tucker [Mon, 28 Feb 2022 11:21:36 +0000 (22:21 +1100)] 
No unused param warnings for clang-12 and gcc-11.

These have too many false positives in -Werror tests on the github CI
since we often provide empty stub functions for functionality not needed
for particular configurations.

3 years agoAdd debian-i386 test target.
Darren Tucker [Sat, 26 Feb 2022 03:10:41 +0000 (14:10 +1100)] 
Add debian-i386 test target.

3 years agoAllow ppoll_time64 in seccomp sandbox.
Darren Tucker [Sat, 26 Feb 2022 03:06:14 +0000 (14:06 +1100)] 
Allow ppoll_time64 in seccomp sandbox.

Should fix sandbox violations on (some? at least i386 and armhf) 32bit
Linux platforms.  Patch from chutzpahu at gentoo.org and cjwatson at
debian.org via bz#3396.

3 years agoImprove handling of _getshort and _getlong.
Darren Tucker [Fri, 25 Feb 2022 08:47:48 +0000 (19:47 +1100)] 
Improve handling of _getshort and _getlong.

If the system native ones are exactly as required then use them,
otherwise use the local versions mapped to another name to prevent
name collisions.

3 years agoConstify utimes in compat library to match specs.
Darren Tucker [Fri, 25 Feb 2022 04:14:22 +0000 (15:14 +1100)] 
Constify utimes in compat library to match specs.

Patch from vapier at chromium.org.

3 years agoANSIfy getshort and getlong.
Darren Tucker [Fri, 25 Feb 2022 02:50:56 +0000 (13:50 +1100)] 
ANSIfy getshort and getlong.

These functions appear to have come from OpenBSD's lib/libc/net/res_comp.c
which made this change in 2005.

3 years agoUse PICFLAG instead of hard coding -fPIC.
Darren Tucker [Fri, 25 Feb 2022 02:23:04 +0000 (13:23 +1100)] 
Use PICFLAG instead of hard coding -fPIC.

3 years agoAdd tests for latest releases of {Libre,Open}SSL.
Darren Tucker [Fri, 25 Feb 2022 00:37:11 +0000 (11:37 +1100)] 
Add tests for latest releases of {Libre,Open}SSL.

3 years agoImprove detection of -fzero-call-used-regs=all support
Colin Watson [Thu, 24 Feb 2022 16:04:18 +0000 (16:04 +0000)] 
Improve detection of -fzero-call-used-regs=all support

GCC doesn't tell us whether this option is supported unless it runs into
the situation where it would need to emit corresponding code.

3 years agoupstream: free(3) wants stdlib.h
djm@openbsd.org [Wed, 23 Feb 2022 21:21:49 +0000 (21:21 +0000)] 
upstream: free(3) wants stdlib.h

OpenBSD-Commit-ID: 227a8c70a95b4428c49e46863c9ef4bd318a3b8a

3 years agoupstream: put back the scp manpage changes for SFTP mode too
djm@openbsd.org [Wed, 23 Feb 2022 21:21:16 +0000 (21:21 +0000)] 
upstream: put back the scp manpage changes for SFTP mode too

OpenBSD-Commit-ID: 05dc53921f927e1b5e5694e1f3aa314549f2e768

3 years agoupstream: and we go back to testing sftp-scp after the 8.9
deraadt@openbsd.org [Wed, 23 Feb 2022 19:01:00 +0000 (19:01 +0000)] 
upstream: and we go back to testing sftp-scp after the 8.9

release...

OpenBSD-Commit-ID: a80440168258adca543a4607b871327a279c569c

3 years agomakedepend V_8_9_P1
Damien Miller [Wed, 23 Feb 2022 11:31:11 +0000 (22:31 +1100)] 
makedepend

3 years agoupstream: avoid integer overflow of auth attempts (harmless, caught
djm@openbsd.org [Wed, 23 Feb 2022 11:18:13 +0000 (11:18 +0000)] 
upstream: avoid integer overflow of auth attempts (harmless, caught

by monitor)

OpenBSD-Commit-ID: 488ad570b003b21e0cd9e7a00349cfc1003b4d86

3 years agoupstream: randomise the password used in fakepw
djm@openbsd.org [Wed, 23 Feb 2022 11:17:10 +0000 (11:17 +0000)] 
upstream: randomise the password used in fakepw

OpenBSD-Commit-ID: 34e159f73b1fbf0a924a9c042d8d61edde293947

3 years agoupstream: use asprintf to construct .rhosts paths
djm@openbsd.org [Wed, 23 Feb 2022 11:15:57 +0000 (11:15 +0000)] 
upstream: use asprintf to construct .rhosts paths

OpenBSD-Commit-ID: 8286e8d3d2c6ff916ff13d041d1713073f738a8b

3 years agoupstream: openssh-8.9
djm@openbsd.org [Wed, 23 Feb 2022 11:07:09 +0000 (11:07 +0000)] 
upstream: openssh-8.9

OpenBSD-Commit-ID: 5c5f791c87c483cdab6d9266b43acdd9ca7bde0e

3 years agoExtend select+rlimit sanbox test to include poll.
Darren Tucker [Tue, 22 Feb 2022 04:29:22 +0000 (15:29 +1100)] 
Extend select+rlimit sanbox test to include poll.

POSIX specifies that poll() shall fail if "nfds argument is greater
than {OPEN_MAX}".  The setrlimit sandbox sets this to effectively zero
so this causes poll() to fail in the preauth privsep process.

This is likely the underlying cause for the previously observed similar
behaviour of select() on plaforms where it is implement in userspace on
top of poll().

3 years agoAdd Alpine Linux test VM.
Darren Tucker [Tue, 22 Feb 2022 02:08:59 +0000 (13:08 +1100)] 
Add Alpine Linux test VM.

3 years agoInclude sys/param.h if present.
Darren Tucker [Tue, 22 Feb 2022 01:27:07 +0000 (12:27 +1100)] 
Include sys/param.h if present.

Needed for howmany() on MUSL systems such as Alpine.

3 years agoOnly include sys/poll.h if we don't have poll.h.
Darren Tucker [Tue, 22 Feb 2022 01:25:52 +0000 (12:25 +1100)] 
Only include sys/poll.h if we don't have poll.h.

Prevents warnings on MUSL based systems such as Alpine.

3 years agodisable agent-restrict test on minix3
Damien Miller [Tue, 22 Feb 2022 00:14:51 +0000 (11:14 +1100)] 
disable agent-restrict test on minix3

Minix seems to have a platform-wide limit on the number of
select(2) syscalls that can be concurrently issued. This test
seems to exceed this limit.

Refer to:

https://github.com/Stichting-MINIX-Research-Foundation/minix/blob/R3.3.0/minix/servers/vfs/select.c#L114
https://github.com/Stichting-MINIX-Research-Foundation/minix/blob/R3.3.0/minix/servers/vfs/select.c#L30-L31

3 years agoSkip agent-getpeereid when running as root.
Darren Tucker [Mon, 21 Feb 2022 10:27:20 +0000 (21:27 +1100)] 
Skip agent-getpeereid when running as root.

3 years agoupstream: Aproximate realpath on the expected output by deduping
dtucker@openbsd.org [Sun, 20 Feb 2022 03:47:26 +0000 (03:47 +0000)] 
upstream: Aproximate realpath on the expected output by deduping

leading slashes. Fixes test failure when user's home dir is / which is
possible in some portable configurations.

OpenBSD-Regress-ID: 53b8c53734f8893806961475c7106397f98d9f63

3 years agoReally move DSA to end of list.
Darren Tucker [Sun, 20 Feb 2022 02:30:52 +0000 (13:30 +1100)] 
Really move DSA to end of list.

In commit ad16a84e syncing from OpenBSD, RSA was accidentally moved to
the end of the list instead of DSA.  Spotted by andrew at fyfe.gb.net.

3 years agoAdd test configs for MUSL C library.
Darren Tucker [Fri, 18 Feb 2022 01:12:21 +0000 (12:12 +1100)] 
Add test configs for MUSL C library.

3 years agominix needs BROKEN_POLL too; chokes on /dev/null
Damien Miller [Thu, 17 Feb 2022 11:54:19 +0000 (22:54 +1100)] 
minix needs BROKEN_POLL too; chokes on /dev/null

3 years agoupstream: check for EINTR/EAGAIN failures in the rfd fast-path; caught
djm@openbsd.org [Thu, 17 Feb 2022 10:58:27 +0000 (10:58 +0000)] 
upstream: check for EINTR/EAGAIN failures in the rfd fast-path; caught

by dtucker's minix3 vm :) ok dtucker@

OpenBSD-Commit-ID: 2e2c895a3e82ef347aa6694394a76a438be91361

3 years agoComment hurd test, the VM is currently broken.
Darren Tucker [Thu, 17 Feb 2022 11:05:29 +0000 (22:05 +1100)] 
Comment hurd test, the VM is currently broken.

3 years agofind sk-dummy.so when build_dir != src_dir
Damien Miller [Thu, 17 Feb 2022 10:15:16 +0000 (21:15 +1100)] 
find sk-dummy.so when build_dir != src_dir

spotted by Corinna Vinschen; feedback & ok dtucker@

3 years agoupdate versions in preparation for 8.9 release
Damien Miller [Wed, 16 Feb 2022 05:26:17 +0000 (16:26 +1100)] 
update versions in preparation for 8.9 release

3 years agoupstream: document the unbound/host-bound options to
djm@openbsd.org [Tue, 15 Feb 2022 05:13:36 +0000 (05:13 +0000)] 
upstream: document the unbound/host-bound options to

PubkeyAuthentication; spotted by HARUYAMA Seigo

OpenBSD-Commit-ID: 298f681b66a9ecd498f0700082c7a6c46e948981

3 years agoTest if sshd accidentally acquires controlling tty
Darren Tucker [Mon, 14 Feb 2022 03:19:40 +0000 (14:19 +1100)] 
Test if sshd accidentally acquires controlling tty

When SSHD_ACQUIRES_CTTY is defined, test for the problematic behaviour
in the STREAMS code before activating the workaround.  ok djm@

3 years agoAdd cygwin-release test config.
Darren Tucker [Fri, 11 Feb 2022 23:24:56 +0000 (10:24 +1100)] 
Add cygwin-release test config.

This tests the flags used to build the cygwin release binaries.

3 years agoMove SSHD_ACQUIRES_CTTY workaround into compat.
Darren Tucker [Fri, 11 Feb 2022 10:00:35 +0000 (21:00 +1100)] 
Move SSHD_ACQUIRES_CTTY workaround into compat.

On some (most? all?) SysV based systems with STREAMS based ptys,
sshd could acquire a controlling terminal during pty setup when
it pushed the "ptem" module, due to what is probably a bug in
the STREAMS driver that's old enough to vote.  Because it was the
privileged sshd's controlling terminal, it was not available for
the user's session, which ended up without one.  This is known to
affect at least Solaris <=10, derivatives such as OpenIndiana and
several other SysV systems.  See bz#245 for the backstory.

In the we past worked around that by not calling setsid in the
privileged sshd child, which meant it was not a session or process
group leader.  This solved controlling terminal problem because sshd
was not eligble to acquire one, but had other side effects such as
not cleaning up helper subprocesses in the SIGALRM handler since it
was not PG leader.  Recent cleanups in the signal handler uncovered
this, resulting in the LoginGraceTime timer not cleaning up privsep
unprivileged processes.

This change moves the workaround into the STREAMS pty allocation code,
by allocating a sacrificial pty to act as sshd's controlling terminal
before allocating user ptys, so those are still available for users'
sessions.

On the down side:
 - this will waste a pty per ssh connection on affected platforms.

On the up side:
 - it makes the process group behaviour consistent between platforms.

 - it puts the workaround nearest the code that actually causes the
   problem and competely out of the mainline code.

 - the workaround is only activated if you use the STREAMS code.  If,
   say, Solaris 11 has the bug but also a working openpty() it doesn't
   matter that we defined SSHD_ACQUIRES_CTTY.

 - the workaround is only activated when the fist pty is allocated,
   ie in the post-auth privsep monitor.  This means there's no risk
   of fd leaks to the unprivileged processes, and there's no effect on
   sessions that do not allocate a pty.

Based on analysis and work by djm@, ok djm@