summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2022-04-01Only return events from ppoll that were requested.V_8_9Darren Tucker
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@
2022-03-11Resync fmt_scaled. with OpenBSD.Darren Tucker
Fixes underflow reported in bz#3401.
2022-03-08Default to not using sandbox when cross compiling.Darren Tucker
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.
2022-03-01upstream: pack pollfd array before server_accept_loop() ppoll()djm@openbsd.org
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
2022-02-26Allow ppoll_time64 in seccomp sandbox.Darren Tucker
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.
2022-02-25Improve detection of -fzero-call-used-regs=all supportColin Watson
GCC doesn't tell us whether this option is supported unless it runs into the situation where it would need to emit corresponding code.
2022-02-24upstream: free(3) wants stdlib.hdjm@openbsd.org
OpenBSD-Commit-ID: 227a8c70a95b4428c49e46863c9ef4bd318a3b8a
2022-02-23makedependV_8_9_P1Damien Miller
2022-02-23upstream: avoid integer overflow of auth attempts (harmless, caughtdjm@openbsd.org
by monitor) OpenBSD-Commit-ID: 488ad570b003b21e0cd9e7a00349cfc1003b4d86
2022-02-23upstream: randomise the password used in fakepwdjm@openbsd.org
OpenBSD-Commit-ID: 34e159f73b1fbf0a924a9c042d8d61edde293947
2022-02-23upstream: use asprintf to construct .rhosts pathsdjm@openbsd.org
OpenBSD-Commit-ID: 8286e8d3d2c6ff916ff13d041d1713073f738a8b
2022-02-23upstream: openssh-8.9djm@openbsd.org
OpenBSD-Commit-ID: 5c5f791c87c483cdab6d9266b43acdd9ca7bde0e
2022-02-22Extend select+rlimit sanbox test to include poll.Darren Tucker
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().
2022-02-22Add Alpine Linux test VM.Darren Tucker
2022-02-22Include sys/param.h if present.Darren Tucker
Needed for howmany() on MUSL systems such as Alpine.
2022-02-22Only include sys/poll.h if we don't have poll.h.Darren Tucker
Prevents warnings on MUSL based systems such as Alpine.
2022-02-22disable agent-restrict test on minix3Damien Miller
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
2022-02-21Skip agent-getpeereid when running as root.Darren Tucker
2022-02-20upstream: Aproximate realpath on the expected output by dedupingdtucker@openbsd.org
leading slashes. Fixes test failure when user's home dir is / which is possible in some portable configurations. OpenBSD-Regress-ID: 53b8c53734f8893806961475c7106397f98d9f63
2022-02-20Really move DSA to end of list.Darren Tucker
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.
2022-02-18Add test configs for MUSL C library.Darren Tucker
2022-02-17minix needs BROKEN_POLL too; chokes on /dev/nullDamien Miller
2022-02-17upstream: check for EINTR/EAGAIN failures in the rfd fast-path; caughtdjm@openbsd.org
by dtucker's minix3 vm :) ok dtucker@ OpenBSD-Commit-ID: 2e2c895a3e82ef347aa6694394a76a438be91361
2022-02-17Comment hurd test, the VM is currently broken.Darren Tucker
2022-02-17find sk-dummy.so when build_dir != src_dirDamien Miller
spotted by Corinna Vinschen; feedback & ok dtucker@
2022-02-16update versions in preparation for 8.9 releaseDamien Miller
2022-02-15upstream: document the unbound/host-bound options todjm@openbsd.org
PubkeyAuthentication; spotted by HARUYAMA Seigo OpenBSD-Commit-ID: 298f681b66a9ecd498f0700082c7a6c46e948981
2022-02-14Test if sshd accidentally acquires controlling ttyDarren Tucker
When SSHD_ACQUIRES_CTTY is defined, test for the problematic behaviour in the STREAMS code before activating the workaround. ok djm@
2022-02-12Add cygwin-release test config.Darren Tucker
This tests the flags used to build the cygwin release binaries.
2022-02-11Move SSHD_ACQUIRES_CTTY workaround into compat.Darren Tucker
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@
2022-02-11Simplify handling of --with-ssl-dir.Darren Tucker
ok djm@
2022-02-11Stop testing OpenBSD HEAD on 6.9 and 7.0.Darren Tucker
HEAD is not guaranteed to work on previous stable branches, and at the moment is broken due to libfido API changes.
2022-02-11upstream: Always initialize delim before passing to hpdelim2 whichdtucker@openbsd.org
might not set it. Found by the Valgrind tests on github, ok deraadt@ OpenBSD-Commit-ID: c830c0db185ca43beff3f41c19943c724b4f636d
2022-02-11Fix helper include path and remove excess code.Darren Tucker
Looks like test_hpdelim.c was imported twice into the same file. Spotted by kevin.brott at gmail com and chris at cataclysmal org.
2022-02-10Put poll.h inside ifdef.Darren Tucker
2022-02-10We now support POLLPRI so actually define it.Darren Tucker
2022-02-10upstream: Add test for empty hostname with port.dtucker@openbsd.org
OpenBSD-Regress-ID: e19e89d3c432b68997667efea44cf015bbe2a7e3
2022-02-10upstream: Add unit tests for hpdelim.dtucker@openbsd.org
OpenBSD-Regress-ID: be97b85c19895e6a1ce13c639765a3b48fd95018
2022-02-10upstream: revert for imminent OpenSSH release, which wil ship withdjm@openbsd.org
scp in RCP mode. > revision 1.106 > date: 2021/10/15 14:46:46; author: deraadt; state: Exp; lines: +13 -9; commitid: w5n9B2RE38tFfggl; > 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. This will be put back once the OpenSSH release is done. OpenBSD-Commit-ID: 0c725481a78210aceecff1537322c0b2df03e768
2022-02-10upstream: Switch hpdelim interface to accept only ":" as delimiter.dtucker@openbsd.org
Historicallly, hpdelim accepted ":" or "/" as a port delimiter between hosts (or addresses) and ports. These days most of the uses for "/" are no longer accepted, so there are several places where it checks the delimiter to disallow it. Make hpdelim accept only ":" and use hpdelim2 in the other cases. ok djm@ OpenBSD-Commit-ID: 7e6420bd1be87590b6840973f5ad5305804e3102
2022-02-07fix typos in previouspedro martelletto
2022-02-07compat code for fido_assert_set_clientdata()Damien Miller
2022-02-07upstream: use libfido2 1.8.0+ fido_assert_set_clientdata() insteaddjm@openbsd.org
of manually hashing data outselves. Saves a fair bit of code and makes life easier for some -portable platforms. OpenBSD-Commit-ID: 351dfaaa5ab1ee928c0e623041fca28078cff0e0
2022-02-07upstream: remove please from manual pages ok jmc@ sthen@ millert@jsg@openbsd.org
OpenBSD-Commit-ID: 6543acb00f4f38a23472538e1685c013ca1a99aa
2022-02-07upstream: Since they are deprecated, move DSA to the end of thedtucker@openbsd.org
default list of public keys so that they will be tried last. From github PR#295 from "ProBackup-nl", ok djm@ OpenBSD-Commit-ID: 7e5d575cf4971d4e2de92e0b6d6efaba53598bf0
2022-02-02portable-specific string array constificationDamien Miller
from Mike Frysinger
2022-02-02upstream: test 'ssh-keygen -Y find-principals' with wildcarddjm@openbsd.org
principals; from Fabian Stelzer OpenBSD-Regress-ID: fbe4da5f0032e7ab496527a5bf0010fd700f8f40
2022-02-02upstream: Enable all supported ciphers and macs in the serverdtucker@openbsd.org
before trying to benchmark them. Increase the data file size to get more signal. OpenBSD-Regress-ID: dc3697d9f7defdfc51c608782c8e750128e46eb6
2022-02-02upstream: allow 'ssh-keygen -Y find-principals' to match wildcarddjm@openbsd.org
principals in allowed_signers files; from Fabian Stelzer OpenBSD-Commit-ID: 1e970b9c025b80717dddff5018fe5e6f470c5098
2022-02-02upstream: mark const string array contents const too, i.e. staticdjm@openbsd.org
const char *array => static const char * const array from Mike Frysinger OpenBSD-Commit-ID: a664e31ea6a795d7c81153274a5f47b22bdc9bc1