Commit Graph

8544 Commits

Author SHA1 Message Date
Darren Tucker 58fca12ba9 Remove LOGIN_PROGRAM.
UseLogin is gone, remove leftover.  bz#2665, from cjwatson at debian.org
2017-01-16 09:08:32 +11:00
djm@openbsd.org b108ce92aa upstream commit
relax PKCS#11 whitelist a bit to allow libexec as well as
lib directories.

Upstream-ID: cf5617958e2e2d39f8285fd3bc63b557da484702
2017-01-04 13:23:04 +11:00
djm@openbsd.org c7995f296b upstream commit
check number of entries in SSH2_FXP_NAME response; avoids
unreachable overflow later. Reported by Jann Horn

Upstream-ID: b6b2b434a6d6035b1644ca44f24cd8104057420f
2017-01-04 13:23:04 +11:00
djm@openbsd.org ddd3d34e5c upstream commit
fix deadlock when keys/principals command produces a lot of
output and a key is matched early; bz#2655, patch from jboning AT gmail.com

Upstream-ID: e19456429bf99087ea994432c16d00a642060afe
2017-01-03 15:24:42 +11:00
Darren Tucker 30eee7d1b2 Re-add missing "Prerequisites" header and fix typo
Patch from HARUYAMA Seigo <haruyama at unixuser org>.
2016-12-20 12:16:11 +11:00
djm@openbsd.org c8c60f3663 upstream commit
use standard /bin/sh equality test; from Mike Frysinger

Upstream-Regress-ID: 7b6f0b63525f399844c8ac211003acb8e4b0bec2
2016-12-20 09:35:51 +11:00
Damien Miller 4a354fc231 crank version numbers for release 2016-12-19 15:59:41 +11:00
djm@openbsd.org 5f8d0bb841 upstream commit
openssh-7.4

Upstream-ID: 1ee404adba6bbe10ae9277cbae3a94abe2867b79
2016-12-19 15:59:40 +11:00
djm@openbsd.org 3a8213ea0e upstream commit
remove testcase that depends on exact output and
behaviour of snprintf(..., "%s", NULL)

Upstream-Regress-ID: cab4288531766bd9593cb556613b91a2eeefb56f
2016-12-19 15:59:40 +11:00
dtucker@openbsd.org eae735a82d upstream commit
Use LOGNAME to get current user and fall back to whoami if
not set. Mainly to benefit -portable since some platforms don't have whoami.

Upstream-Regress-ID: e3a16b7836a3ae24dc8f8a4e43fdf8127a60bdfa
2016-12-19 15:01:10 +11:00
dtucker@openbsd.org 0d2f884284 upstream commit
Add regression test for AllowUsers and DenyUsers.  Patch from
Zev Weiss <zev at bewilderbeest.net>

Upstream-Regress-ID: 8f1aac24d52728398871dac14ad26ea38b533fb9
2016-12-17 09:11:41 +11:00
Darren Tucker 3bc8180a00 Add missing monitor.h include.
Fixes warning pointed out by Zev Weiss <zev at bewilderbeest.net>
2016-12-16 15:02:24 +11:00
djm@openbsd.org 410681f901 upstream commit
revert to rev1.2; the new bits in this test depend on changes
to ssh that aren't yet committed

Upstream-Regress-ID: 828ffc2c7afcf65d50ff2cf3dfc47a073ad39123
2016-12-16 13:49:40 +11:00
dtucker@openbsd.org 2f2ffa4fbe upstream commit
Move the "stop sshd" code into its own helper function.
Patch from Zev Weiss <zev at bewilderbeest.net>, ok djm@

Upstream-Regress-ID: a113dea77df5bd97fb4633ea31f3d72dbe356329
2016-12-16 13:16:34 +11:00
djm@openbsd.org e15e715233 upstream commit
regression test for certificates along with private key
with no public half. bz#2617, mostly from Adam Eijdenberg

Upstream-Regress-ID: 2e74dc2c726f4dc839609b3ce045466b69f01115
2016-12-16 13:16:13 +11:00
dtucker@openbsd.org 9a70ec085f upstream commit
Use $SUDO to read pidfile in case root's umask is
restricted.  From portable.

Upstream-Regress-ID: f6b1c7ffbc5a0dfb7d430adb2883344899174a98
2016-12-16 13:16:13 +11:00
dtucker@openbsd.org fe06b68f82 upstream commit
Add missing braces in DenyUsers code.  Patch from zev at
bewilderbeest.net, ok deraadt@

Upstream-ID: d747ace338dcf943b077925f90f85f789714b54e
2016-12-16 13:12:18 +11:00
dtucker@openbsd.org dcc7d74242 upstream commit
Fix text in error message.  Patch from zev at
bewilderbeest.net.

Upstream-ID: deb0486e175e7282f98f9a15035d76c55c84f7f6
2016-12-16 13:12:18 +11:00
djm@openbsd.org b737e4d743 upstream commit
disable Unix-domain socket forwarding when privsep is
disabled

Upstream-ID: ab61516ae0faadad407857808517efa900a0d6d0
2016-12-14 11:51:52 +11:00
djm@openbsd.org 08a1e7014d upstream commit
log connections dropped in excess of MaxStartups at
verbose LogLevel; bz#2613 based on diff from Tomas Kuthan; ok dtucker@

Upstream-ID: 703ae690dbf9b56620a6018f8a3b2389ce76d92b
2016-12-14 11:51:52 +11:00
Darren Tucker 10e290ec00 Get default of TEST_SSH_UTF8 from environment. 2016-12-13 13:51:32 +11:00
Darren Tucker b9b8ba3f9e Remove commented-out includes.
These commented-out includes have "Still needed?" comments.  Since
they've been commented out for ~13 years I assert that they're not.
2016-12-13 12:56:40 +11:00
Darren Tucker 25275f1c9d Add prototype for strcasestr in compat library. 2016-12-13 12:54:23 +11:00
Darren Tucker afec07732a Add strcasestr to compat library.
Fixes build on (at least) Solaris 10.
2016-12-13 10:23:03 +11:00
Damien Miller dda78a03af Force Turkish locales back to C/POSIX; bz#2643
Turkish locales are unique in their handling of the letters 'i' and
'I' (yes, they are different letters) and OpenSSH isn't remotely
prepared to deal with that. For now, the best we can do is to force
OpenSSH to use the C/POSIX locale and try to preserve the UTF-8
encoding if possible.

ok dtucker@
2016-12-12 13:58:59 +11:00
Darren Tucker c35995048f exit is in stdlib.h not unistd.h (that's _exit). 2016-12-09 12:52:02 +11:00
Darren Tucker d399a8b914 Include <unistd.h> for exit in utf8 locale test. 2016-12-09 12:33:25 +11:00
Darren Tucker 47b8c99ab3 Check for utf8 local support before testing it.
Check for utf8 local support and if not found, do not attempt to run the
utf8 tests.  Suggested by djm@
2016-12-08 15:48:34 +11:00
Darren Tucker 4089fc1885 Use AC_PATH_TOOL for krb5-config.
This will use the host-prefixed version when cross compiling; patch from
david.michael at coreos.com.
2016-12-08 12:57:24 +11:00
djm@openbsd.org b4867e0712 upstream commit
make IdentityFile successfully load and use certificates that
have no corresponding bare public key. E.g. just a private id_rsa and
certificate id_rsa-cert.pub (and no id_rsa.pub).

bz#2617 ok dtucker@

Upstream-ID: c1e9699b8c0e3b63cc4189e6972e3522b6292604
2016-12-06 18:50:12 +11:00
Damien Miller c9792783a9 Add a gnome-ssh-askpass3 target for GTK+3 version
Based on patch from Colin Watson via bz#2640
2016-12-06 18:43:37 +11:00
Damien Miller 7be85ae02b Make gnome-ssh-askpass2.c GTK+3-friendly
Patch from Colin Watson via bz#2640
2016-12-06 18:43:37 +11:00
djm@openbsd.org b9844a45c7 upstream commit
Fix public key authentication when multiple
authentication is in use. Instead of deleting and re-preparing the entire
keys list, just reset the 'used' flags; the keys list is already in a good
order (with already- tried keys at the back)

Analysis and patch from Vincent Brillault on bz#2642; ok dtucker@

Upstream-ID: 7123f12dc2f3bcaae715853035a97923d7300176
2016-12-05 17:24:42 +11:00
dtucker@openbsd.org f2398eb774 upstream commit
Unlink PidFile on SIGHUP and always recreate it when the
new sshd starts. Regression tests (and possibly other things) depend on the
pidfile being recreated after SIGHUP, and unlinking it means it won't contain
a stale pid if sshd fails to restart.  ok djm@ markus@

Upstream-ID: 132dd6dda0c77dd49d2f15b2573b5794f6160870
2016-12-05 17:24:42 +11:00
djm@openbsd.org 85aa2efeba upstream commit
test new behaviour of cert force-command restriction vs.
authorized_key/ principals

Upstream-Regress-ID: 399efa7469d40c404c0b0a295064ce75d495387c
2016-11-30 19:44:50 +11:00
jmc@openbsd.org 5d333131cd upstream commit
tweak previous; while here fix up FILES and AUTHORS;

Upstream-ID: 93f6e54086145a75df8d8ec7d8689bdadbbac8fa
2016-11-30 19:44:25 +11:00
djm@openbsd.org 786d5994da upstream commit
add a whitelist of paths from which ssh-agent will load
(via ssh-pkcs11-helper) a PKCS#11 module; ok markus@

Upstream-ID: fe79769469d9cd6d26fe0dc15751b83ef2a06e8f
2016-11-30 19:44:24 +11:00
djm@openbsd.org 7844f357cd upstream commit
Add a sshd_config DisableForwaring option that disables
X11, agent, TCP, tunnel and Unix domain socket forwarding, as well as
anything else we might implement in the future.

This, like the 'restrict' authorized_keys flag, is intended to be a
simple and future-proof way of restricting an account. Suggested as
a complement to 'restrict' by Jann Horn; ok markus@

Upstream-ID: 203803f66e533a474086b38a59ceb4cf2410fcf7
2016-11-30 19:44:01 +11:00
djm@openbsd.org fd6dcef203 upstream commit
When a forced-command appears in both a certificate and
an authorized keys/principals command= restriction, refuse to accept the
certificate unless they are identical.

The previous (documented) behaviour of having the certificate forced-
command override the other could be a bit confused and more error-prone.

Pointed out by Jann Horn of Project Zero; ok dtucker@

Upstream-ID: 79d811b6eb6bbe1221bf146dde6928f92d2cd05f
2016-11-30 19:44:01 +11:00
dtucker@openbsd.org 7fc4766ac7 upstream commit
On startup, check to see if sshd is already daemonized
and if so, skip the call to daemon() and do not rewrite the PidFile.  This
means that when sshd re-execs itself on SIGHUP the process ID will no longer
change.  Should address bz#2641.  ok djm@ markus@.

Upstream-ID: 5ea0355580056fb3b25c1fd6364307d9638a37b9
2016-11-30 19:44:01 +11:00
Damien Miller c9f880c195 factor out common PRNG reseed before privdrop
Add a call to RAND_poll() to ensure than more than pid+time gets
stirred into child processes states. Prompted by analysis from Jann
Horn at Project Zero. ok dtucker@
2016-11-30 13:51:49 +11:00
dtucker@openbsd.org 79e4829ec8 upstream commit
Allow PuTTY interop tests to run unattended.  bz#2639,
patch from cjwatson at debian.org.

Upstream-Regress-ID: 4345253558ac23b2082aebabccd48377433b6fe0
2016-11-29 17:19:57 +11:00
dtucker@openbsd.org 504c3a9a1b upstream commit
Reverse args to sshd-log-wrapper.  Matches change in
portable, where it allows sshd do be optionally run under Valgrind.

Upstream-Regress-ID: b438d1c6726dc5caa2a45153e6103a0393faa906
2016-11-29 17:19:21 +11:00
dtucker@openbsd.org bd13017736 upstream commit
Fix typo in trace message; from portable.

Upstream-Regress-ID: 4c4a2ba0d37faf5fd230a91b4c7edb5699fbd73a
2016-11-29 17:17:19 +11:00
tb@openbsd.org 7da751d8b0 upstream commit
Clean up MALLOC_OPTIONS.  For the unittests, move
MALLOC_OPTIONS and TEST_ENV to unittets/Makefile.inc.

ok otto

Upstream-Regress-ID: 890d497e0a38eeddfebb11cc429098d76cf29f12
2016-11-29 17:16:29 +11:00
tb@openbsd.org 36f58e6822 upstream commit
Remove the obsolete A and P flags from MALLOC_OPTIONS.

ok dtucker

Upstream-Regress-ID: 6cc25024c8174a87e5734a0dc830194be216dd59
2016-11-29 17:14:27 +11:00
dtucker@openbsd.org b0899ee26a upstream commit
Factor out code to disconnect from controlling terminal
into its own function.  ok djm@

Upstream-ID: 39fd9e8ebd7222615a837312face5cc7ae962885
2016-11-29 16:51:27 +11:00
djm@openbsd.org 54d022026a upstream commit
use sshbuf_allocate() to pre-allocate the buffer used for
loading keys. This avoids implicit realloc inside the buffer code, which
might theoretically leave fragments of the key on the heap. This doesn't
appear to happen in practice for normal sized keys, but was observed for
novelty oversize ones.

Pointed out by Jann Horn of Project Zero; ok markus@

Upstream-ID: d620e1d46a29fdea56aeadeda120879eddc60ab1
2016-11-29 16:48:02 +11:00
djm@openbsd.org a9c7460887 upstream commit
split allocation out of sshbuf_reserve() into a separate
sshbuf_allocate() function; ok markus@

Upstream-ID: 11b8a2795afeeb1418d508a2c8095b3355577ec2
2016-11-29 16:48:02 +11:00
markus@openbsd.org f0ddedee46 upstream commit
allow ClientAlive{Interval,CountMax} in Match; ok dtucker,
djm

Upstream-ID: 8beb4c1eadd588f1080b58932281983864979f55
2016-11-24 16:07:26 +11:00