Commit Graph

9314 Commits

Author SHA1 Message Date
dtucker@openbsd.org e655ee04a3 upstream: Now that ssh can't be setuid, remove the
original_real_uid and original_effective_uid globals and replace with calls
to plain getuid(). ok djm@

OpenBSD-Commit-ID: 92561c0cd418d34e6841e20ba09160583e27b68c
2018-07-31 12:20:13 +10:00
dtucker@openbsd.org 73ddb25bae upstream: Remove uid checks from low port binds. Now that ssh
cannot be setuid and sshd always has privsep on, we can remove the uid checks
for low port binds and just let the system do the check. We leave a sanity
check for the !privsep case so long as the code is stil there.  with & ok
djm@

OpenBSD-Commit-ID: 9535cfdbd1cd54486fdbedfaee44ce4367ec7ca0
2018-07-31 12:18:49 +10:00
dtucker@openbsd.org c12033e102 upstream: ssh(1) no longer supports being setuid root. Remove reference
to crc32 which went with protocol 1.  Pointed out by deraadt@.

OpenBSD-Commit-ID: f8763c25fd96ed91dd1abdab5667fd2e27e377b6
2018-07-27 15:09:59 +10:00
Damien Miller 4492e2ec4e correct snprintf truncation check in closefrom()
Truncation cannot happen unless the system has set PATH_MAX to some
nonsensically low value.

bz#2862, patch from Daniel Le
2018-07-27 14:20:09 +10:00
Darren Tucker 149cab325a Include stdarg.h in mkdtemp for va_list. 2018-07-27 13:46:06 +10:00
deraadt@openbsd.org 6728f31bdf upstream: Don't redefine Makefile choices which come correct from
bsd.*.mk ok markus

OpenBSD-Commit-ID: 814b2f670df75759e1581ecef530980b2b3d7e0f
2018-07-26 13:55:50 +10:00
deraadt@openbsd.org 21fd477a85 upstream: fix indent; Clemens Goessnitzer
OpenBSD-Commit-ID: b5149a6d92b264d35f879d24608087b254857a83
2018-07-26 13:54:30 +10:00
beck@openbsd.org 8e433c2083 upstream: Use the caller provided (copied) pwent struct in
load_public_identity_files instead of calling getpwuid() again and discarding
the argument. This prevents a client crash where tilde_expand_filename calls
getpwuid() again before the pwent pointer is used. Issue noticed and reported
by Pierre-Olivier Martel <pom@apple.com> ok djm@ deraadt@

OpenBSD-Commit-ID: a067d74b5b098763736c94cc1368de8ea3f0b157
2018-07-26 13:54:30 +10:00
jmc@openbsd.org e2127abb10 upstream: oops, failed to notice that SEE ALSO got messed up;
OpenBSD-Commit-ID: 61c1306542cefdc6e59ac331751afe961557427d
2018-07-26 13:54:30 +10:00
kn@openbsd.org ddf1b797c2 upstream: Point to glob in section 7 for the actual list of special
characters instead the C API in section 3.

OK millert jmc nicm, "the right idea" deraadt

OpenBSD-Commit-ID: a74fd215488c382809e4d041613aeba4a4b1ffc6
2018-07-26 13:54:30 +10:00
dtucker@openbsd.org 01c98d9661 upstream: Switch authorized_keys example from ssh-dss to ssh-rsa
since the former is no longer enabled by default.  Pointed out by Daniel A.
Maierhofer, ok jmc

OpenBSD-Commit-ID: 6a196cef53d7524e0c9b58cdbc1b5609debaf8c7
2018-07-26 13:54:30 +10:00
djm@openbsd.org 472269f8fe upstream: slightly-clearer description for AuthenticationMethods - the
lists have comma-separated elements; bz#2663 from Hans Meier

OpenBSD-Commit-ID: 931c983d0fde4764d0942fb2c2b5017635993b5a
2018-07-20 15:02:52 +10:00
Damien Miller c59aca8adb Create control sockets in clean temp directories
Adds a regress/mkdtemp tool and uses it to create empty temp
directories for tests needing control sockets.

Patch from Colin Watson via bz#2660; ok dtucker
2018-07-20 14:55:29 +10:00
djm@openbsd.org 6ad8648e83 upstream: remove unused zlib.h
OpenBSD-Commit-ID: 8d274a9b467c7958df12668b49144056819f79f1
2018-07-20 14:32:07 +10:00
dtucker@openbsd.org 3ba6e68835 upstream: Fix typo in comment. From Alexandru Iacob via github.
OpenBSD-Commit-ID: eff4ec07c6c8c5483533da43a4dda37d72ef7f1d
2018-07-20 14:32:07 +10:00
Darren Tucker c77bc73c91 Explicitly include openssl before zlib.
Some versions of OpenSSL have "free_func" in their headers, which zlib
typedefs.  Including openssl after zlib (eg via sshkey.h) results in
"syntax error before `free_func'", which this fixes.
2018-07-20 13:48:51 +10:00
dtucker@openbsd.org 95d41e90ea upstream: Deprecate UsePrivilegedPort now that support for running
ssh(1) setuid has been removed, remove supporting code and clean up
references to it in the man pages

We have not shipped ssh(1) the setuid bit since 2002.  If ayone
really needs to make connections from a low port number this can
be implemented via a small setuid ProxyCommand.

ok markus@ jmc@ djm@

OpenBSD-Commit-ID: d03364610b7123ae4c6792f5274bd147b6de717e
2018-07-19 21:44:21 +10:00
dtucker@openbsd.org 258dc8bb07 upstream: Remove support for running ssh(1) setuid and fatal if
attempted. Do not link uidwap.c into ssh any more.  Neuters
UsePrivilegedPort, which will be marked as deprecated shortly. ok markus@
djm@

OpenBSD-Commit-ID: c4ba5bf9c096f57a6ed15b713a1d7e9e2e373c42
2018-07-19 21:41:42 +10:00
dtucker@openbsd.org ac590760b2 upstream: Slot 0 in the hostbased key array was previously RSA1,
but that is now gone and the slot is unused so remove it.  Remove two
now-unused macros, and add an array bounds check to the two remaining ones
(array is statically sized, so mostly a safety check on future changes). ok
markus@

OpenBSD-Commit-ID: 2e4c0ca6cc1d8daeccead2aa56192a3f9d5e1e7a
2018-07-19 20:17:33 +10:00
dtucker@openbsd.org 26efc2f5df upstream: Remove support for loading HostBasedAuthentication keys
directly in ssh(1) and always use ssh-keysign.  This removes one of the few
remaining reasons why ssh(1) might be setuid.  ok markus@

OpenBSD-Commit-ID: 97f01e1448707129a20d75f86bad5d27c3cf0b7d
2018-07-19 20:17:33 +10:00
djm@openbsd.org 3eb7f1038d upstream: keep options.identity_file_userprovided array in sync when we
load keys, fixing some spurious error messages; ok markus

OpenBSD-Commit-ID: c63e3d5200ee2cf9e35bda98de847302566c6a00
2018-07-16 17:08:13 +10:00
djm@openbsd.org 2f131e1b34 upstream: memleak in unittest; found by valgrind
OpenBSD-Regress-ID: 168c23b0fb09fc3d0b438628990d3fd9260a8a5e
2018-07-16 13:12:28 +10:00
djm@openbsd.org de2997a4cf upstream: memleaks; found by valgrind
OpenBSD-Commit-ID: 6c3ba22be53e753c899545f771e8399fc93cd844
2018-07-16 13:12:20 +10:00
Darren Tucker 61cc0003eb Undef a few new macros in sys-queue.h.
Prevents macro redefinition warnings on OSX.
2018-07-14 16:49:01 +10:00
Darren Tucker 30a2c21387 Include unistd.h for geteuid declaration. 2018-07-13 13:40:20 +10:00
Darren Tucker 1dd32c23f2 Fallout from buffer conversion in AUDIT_EVENTS.
Supply missing "int r" and fix error path for sshbuf_new().
2018-07-13 13:38:10 +10:00
djm@openbsd.org 7449c178e9 upstream: make this use ssh_proxy rather than starting/stopping a
daemon for each testcase

OpenBSD-Regress-ID: 608b7655ea65b1ba8fff5a13ce9caa60ef0c8166
2018-07-13 12:14:38 +10:00
djm@openbsd.org dbab02f920 upstream: fix leaks in unit test; with this, all unit tests are
leak free (as far as valgrind can spot anyway)

OpenBSD-Regress-ID: b824d8b27998365379963440e5d18b95ca03aa17
2018-07-13 12:14:38 +10:00
Damien Miller 2f6accff50 Enable leak checks for unit tests with valgrind
Leave the leak checking on unconditionally when running with valgrind.
The unit tests are leak-free and I want them to stay that way.
2018-07-13 11:41:33 +10:00
Damien Miller e46cfbd9db increase timeout to match cfgmatch.sh
lets test pass under valgrind (on my workstation at least)
2018-07-13 11:41:33 +10:00
Damien Miller 6aa1bf475c rm regress/misc/kexfuzz/*.o in distclean target 2018-07-13 11:41:33 +10:00
Damien Miller eef1447ddb repair !WITH_OPENSSL build 2018-07-13 11:41:33 +10:00
Damien Miller 4d3b2f36fd missing headers 2018-07-13 11:41:33 +10:00
Darren Tucker 3f420a692b Remove key.h from portable files too.
Commit 5467fbcb removed key.h so stop including it in portable files
too.  Fixes builds on lots of platforms.
2018-07-12 14:57:46 +10:00
djm@openbsd.org e2c4af3115 upstream: remove prototype to long-gone function
OpenBSD-Commit-ID: 0414642ac7ce01d176b9f359091a66a8bbb640bd
2018-07-12 14:36:12 +10:00
markus@openbsd.org 394a842e60 upstream: treat ssh_packet_write_wait() errors as fatal; ok djm@
OpenBSD-Commit-ID: f88ba43c9d54ed2d911218aa8d3f6285430629c3
2018-07-12 13:18:25 +10:00
markus@openbsd.org 5467fbcb09 upstream: remove legacy key emulation layer; ok djm@
OpenBSD-Commit-ID: 2b1f9619259e222bbd4fe9a8d3a0973eafb9dd8d
2018-07-12 13:18:25 +10:00
martijn@openbsd.org 5dc4c59d54 upstream: s/wuth/with/ in comment
OpenBSD-Commit-ID: 9de41468afd75f54a7f47809d2ad664aa577902c
2018-07-12 11:47:57 +10:00
Darren Tucker 1c688801e9 Include stdlib.h for declaration of free.
Fixes build with -Werror on at least Fedora and probably others.
2018-07-11 12:14:09 +10:00
Damien Miller fccfa239de VALGRIND_CHECK_LEAKS logic was backwards :( 2018-07-11 10:19:56 +10:00
Darren Tucker 416287d45f Fix sshbuf_new error path in skey. 2018-07-11 10:11:17 +10:00
Darren Tucker 7aab109b8b Supply missing third arg in skey.
During the change to the new buffer api the third arg to
sshbuf_get_cstring was ommitted.  Fixes build when configured with skey.
2018-07-11 10:11:17 +10:00
Darren Tucker 380320bb72 Supply some more missing "int r" in skey 2018-07-11 10:11:17 +10:00
Damien Miller d20720d373 disable valgrind memleak checking by default
Add VALGRIND_CHECK_LEAKS knob to turn it back on.
2018-07-11 09:57:44 +10:00
Darren Tucker 79c9d35018 Supply missing "int r" in skey code. 2018-07-11 09:54:00 +10:00
sf@openbsd.org 984bacfaac upstream: re-remove some pre-auth compression bits
This time, make sure to not remove things that are necessary for
pre-auth compression on the client. Add a comment that pre-auth
compression is still supported in the client.

ok markus@

OpenBSD-Commit-ID: 282c6fec7201f18a5c333bbb68d9339734d2f784
2018-07-11 09:52:08 +10:00
Damien Miller 120a1ec74e Adapt portable to legacy buffer API removal 2018-07-10 19:39:52 +10:00
djm@openbsd.org 0f3958c1e6 upstream: kerberos/gssapi fixes for buffer removal
OpenBSD-Commit-ID: 1cdf56fec95801e4563c47f21696f04cd8b60c4c
2018-07-10 19:15:35 +10:00
djm@openbsd.org c74ae8e7c4 upstream: buffer.[ch] and bufaux.c are no more
OpenBSD-Commit-ID: d1a1852284e554f39525eb4d4891b207cfb3d3a0
2018-07-10 18:07:49 +10:00
djm@openbsd.org a881e5a133 upstream: one mention of Buffer that almost got away :)
OpenBSD-Commit-ID: 30d7c27a90b4544ad5dfacf654595710cd499f02
2018-07-10 18:07:49 +10:00