]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
7 years agoPermit getuid()/geteuid() syscalls.
Damien Miller [Fri, 25 May 2018 03:36:58 +0000 (13:36 +1000)] 
Permit getuid()/geteuid() syscalls.

Requested for Linux/s390; patch from Eduardo Barretto via bz#2752;
ok dtucker

7 years agoupstream: support ProxyJump=none to disable ProxyJump
djm@openbsd.org [Tue, 22 May 2018 00:13:26 +0000 (00:13 +0000)] 
upstream: support ProxyJump=none to disable ProxyJump

functionality; bz#2869 ok dtucker@

OpenBSD-Commit-ID: 1c06ee08eb78451b5837fcfd8cbebc5ff3a67a01

7 years agoupstream: correct keyowrd name (permitemptypasswords); from brendan
jmc@openbsd.org [Tue, 15 May 2018 05:40:11 +0000 (05:40 +0000)] 
upstream: correct keyowrd name (permitemptypasswords); from brendan

macdonell

OpenBSD-Commit-ID: ef1bdbc936b2ea693ee37a4c20a94d4d43f5fda3

7 years agoupstream: Emphasise that -w implicitly sets Tunnel=point-to-point
djm@openbsd.org [Fri, 11 May 2018 04:01:11 +0000 (04:01 +0000)] 
upstream: Emphasise that -w implicitly sets Tunnel=point-to-point

and that users should specify an explicit Tunnel directive if they don't want
this. bz#2365.

OpenBSD-Commit-ID: 1a8d9c67ae213ead180481900dbbb3e04864560d

7 years agosync fmt_scaled.c
Damien Miller [Mon, 14 May 2018 04:40:08 +0000 (14:40 +1000)] 
sync fmt_scaled.c

revision 1.17
date: 2018/05/14 04:39:04;  author: djm;  state: Exp;  lines: +5 -2;
commitid: 53zY8GjViUBnWo8Z;
constrain fractional part to [0-9] (less confusing to static analysis); ok ian@

7 years agofix key-options.sh on platforms without openpty(3)
Damien Miller [Fri, 11 May 2018 04:04:40 +0000 (14:04 +1000)] 
fix key-options.sh on platforms without openpty(3)

Skip the pty tests if the platform lacks openpty(3) and has to chown(2)
the pty device explicitly. This typically requires root permissions that
this test lacks.

bz#2856 ok dtucker@

7 years agoupstream: implement EMFILE mitigation for ssh-agent: remember the
djm@openbsd.org [Fri, 11 May 2018 03:38:51 +0000 (03:38 +0000)] 
upstream: implement EMFILE mitigation for ssh-agent: remember the

fd rlimit and stop accepting new connections when it is exceeded (with some
grace). Accept is resumed when enough connections are closed.

bz#2576. feedback deraadt; ok dtucker@

OpenBSD-Commit-ID: 6a85d9cec7b85741961e7116a49f8dae777911ea

7 years agoupstream: Explicit cast when snprintf'ing an uint64. Prevents
dtucker@openbsd.org [Fri, 11 May 2018 03:22:55 +0000 (03:22 +0000)] 
upstream: Explicit cast when snprintf'ing an uint64. Prevents

warnings on platforms where int64 is long not long long.  ok djm@

OpenBSD-Commit-ID: 9c5359e2fbfce11dea2d93f7bc257e84419bd001

7 years agoupstream: Since the previous commit, ssh regress test sftp-chroot was
bluhm@openbsd.org [Thu, 26 Apr 2018 14:47:03 +0000 (14:47 +0000)] 
upstream: Since the previous commit, ssh regress test sftp-chroot was

failing. The sftp program terminated with the wrong exit code as sftp called
fatal() instad of exit(0).  So when the sigchld handler waits for the child,
remember that it was found.  Then don't expect that main() can wait again. OK
dtucker@

OpenBSD-Commit-ID: bfafd940c0de5297940c71ddf362053db0232266

7 years agoUse includes.h instead of config.h.
Darren Tucker [Sun, 29 Apr 2018 07:54:12 +0000 (17:54 +1000)] 
Use includes.h instead of config.h.

This ensures it picks up the definition of DEF_WEAK, the lack of which
can cause compile errors in some cases (eg modern AIX).  From
michael at felt.demon.nl.

7 years agoOmit 3des-cbc if OpenSSL built without DES.
Darren Tucker [Wed, 18 Apr 2018 23:53:14 +0000 (09:53 +1000)] 
Omit 3des-cbc if OpenSSL built without DES.

Patch from hongxu.jia at windriver.com, ok djm@

7 years agoupstream: Disable SSH2_MSG_DEBUG messages for Twisted Conch clients
djm@openbsd.org [Mon, 16 Apr 2018 22:50:44 +0000 (22:50 +0000)] 
upstream: Disable SSH2_MSG_DEBUG messages for Twisted Conch clients

without version numbers since they choke on them under some circumstances.
https://twistedmatrix.com/trac/ticket/9422 via Colin Watson

Newer Conch versions have a version number in their ident string and
handle debug messages okay. https://twistedmatrix.com/trac/ticket/9424

OpenBSD-Commit-ID: 6cf7be262af0419c58ddae11324d9c0dc1577539

7 years agoupstream: don't free the %C expansion, it's used later for
djm@openbsd.org [Sat, 14 Apr 2018 21:50:41 +0000 (21:50 +0000)] 
upstream: don't free the %C expansion, it's used later for

LocalCommand

OpenBSD-Commit-ID: 857b5cb37b2d856bfdfce61289a415257a487fb1

7 years agoupstream: notify user immediately when underlying ssh process dies;
djm@openbsd.org [Fri, 13 Apr 2018 05:04:12 +0000 (05:04 +0000)] 
upstream: notify user immediately when underlying ssh process dies;

patch from Thomas Kuthan in bz2719; ok dtucker@

OpenBSD-Commit-ID: 78fac88c2f08054d1fc5162c43c24162b131cf78

7 years agoAllow nanosleep in preauth privsep child.
Darren Tucker [Fri, 13 Apr 2018 06:23:57 +0000 (16:23 +1000)] 
Allow nanosleep in preauth privsep child.

The new timing attack mitigation code uses nanosleep in the preauth
codepath, allow in systrace andbox too.

7 years agoAllow nanosleep in preauth privsep child.
Darren Tucker [Fri, 13 Apr 2018 06:06:29 +0000 (16:06 +1000)] 
Allow nanosleep in preauth privsep child.

The new timing attack mitigation code uses nanosleep in the preauth
codepath, allow in sandbox.

7 years agoupstream: Defend against user enumeration timing attacks. This
dtucker@openbsd.org [Fri, 13 Apr 2018 03:57:26 +0000 (03:57 +0000)] 
upstream: Defend against user enumeration timing attacks. This

establishes a minimum time for each failed authentication attempt (5ms) and
adds a per-user constant derived from a host secret (0-4ms).  Based on work
by joona.kannisto at tut.fi, ok markus@ djm@.

OpenBSD-Commit-ID: b7845b355bb7381703339c8fb0e57e81a20ae5ca

7 years agoUsing "==" in shell tests is not portable.
Darren Tucker [Fri, 13 Apr 2018 03:43:55 +0000 (13:43 +1000)] 
Using "==" in shell tests is not portable.

Patch from rsbecker at nexbridge.com.

7 years agoFix tunnel forwarding broken in 7.7p1
Damien Miller [Fri, 13 Apr 2018 03:38:06 +0000 (13:38 +1000)] 
Fix tunnel forwarding broken in 7.7p1

bz2855, ok dtucker@

7 years agoprefer to use getrandom() for PRNG seeding
Damien Miller [Fri, 13 Apr 2018 03:31:42 +0000 (13:31 +1000)] 
prefer to use getrandom() for PRNG seeding

Only applies when built --without-openssl. Thanks Jann Horn for
reminder.

7 years agoRevert $REGRESSTMP changes.
Darren Tucker [Fri, 13 Apr 2018 03:13:33 +0000 (13:13 +1000)] 
Revert $REGRESSTMP changes.

Revert 3fd2d229 and subsequent changes as they turned out to be a
portability hassle.

7 years agoMany typo fixes from Karsten Weiss
Damien Miller [Tue, 10 Apr 2018 00:19:02 +0000 (10:19 +1000)] 
Many typo fixes from Karsten Weiss

Spotted using https://github.com/lucasdemarchi/codespell

7 years agoupstream: more typos spotted by Karsten Weiss using codespell
djm@openbsd.org [Tue, 10 Apr 2018 00:14:10 +0000 (00:14 +0000)] 
upstream: more typos spotted by Karsten Weiss using codespell

OpenBSD-Regress-ID: d906a2aea0663810a658b7d0bc61a1d2907d4d69

7 years agoupstream: make this a bit more portable-friendly
djm@openbsd.org [Tue, 10 Apr 2018 00:13:27 +0000 (00:13 +0000)] 
upstream: make this a bit more portable-friendly

OpenBSD-Regress-ID: 62f7b9e055e8dfaab92b3825f158beeb4ca3f963

7 years agoupstream: lots of typos in comments/docs. Patch from Karsten Weiss
djm@openbsd.org [Tue, 10 Apr 2018 00:10:49 +0000 (00:10 +0000)] 
upstream: lots of typos in comments/docs. Patch from Karsten Weiss

after checking with codespell tool
(https://github.com/lucasdemarchi/codespell)

OpenBSD-Commit-ID: 373222f12d7ab606598a2d36840c60be93568528

7 years agoupstream: don't kill ssh-agent's listening socket entriely if we
djm@openbsd.org [Mon, 9 Apr 2018 23:54:49 +0000 (23:54 +0000)] 
upstream: don't kill ssh-agent's listening socket entriely if we

fail to accept a connection; bz#2837, patch from Lukas Kuster

OpenBSD-Commit-ID: 52413f5069179bebf30d38f524afe1a2133c738f

7 years agoupstream: the UseLogin option was removed, so remove it here too.
tj@openbsd.org [Mon, 9 Apr 2018 20:41:22 +0000 (20:41 +0000)] 
upstream: the UseLogin option was removed, so remove it here too.

ok dtucker

OpenBSD-Commit-ID: 7080be73a64d68e21f22f5408a67a0ba8b1b6b06

7 years agoupstream: tweak previous;
jmc@openbsd.org [Sun, 8 Apr 2018 07:36:02 +0000 (07:36 +0000)] 
upstream: tweak previous;

OpenBSD-Commit-ID: 2b9c23022ea7b9dddb62864de4e906000f9d7474

7 years agoupstream: tweak previous;
jmc@openbsd.org [Sat, 7 Apr 2018 13:50:10 +0000 (13:50 +0000)] 
upstream: tweak previous;

OpenBSD-Commit-ID: 38e347b6f8e888f5e0700d01abb1eba7caa154f9

7 years agoupstream: Allow "SendEnv -PATTERN" to clear environment variables
djm@openbsd.org [Fri, 6 Apr 2018 13:02:39 +0000 (13:02 +0000)] 
upstream: Allow "SendEnv -PATTERN" to clear environment variables

previously labeled for sendind. bz#1285 ok dtucker@

OpenBSD-Commit-ID: f6fec9e3d0f366f15903094fbe1754cb359a0df9

7 years agoupstream: relax checking of authorized_keys environment="..."
djm@openbsd.org [Fri, 6 Apr 2018 04:15:45 +0000 (04:15 +0000)] 
upstream: relax checking of authorized_keys environment="..."

options to allow underscores in variable names (regression introduced in
7.7). bz2851, ok deraadt@

OpenBSD-Commit-ID: 69690ffe0c97ff393f2c76d25b4b3d2ed4e4ac9c

7 years agoupstream: add a couple of missed options to the config dump; patch
djm@openbsd.org [Fri, 6 Apr 2018 03:51:27 +0000 (03:51 +0000)] 
upstream: add a couple of missed options to the config dump; patch

from Jakub Jelen via bz2835

OpenBSD-Commit-ID: 5970adadf6ef206bee0dddfc75d24c2019861446

7 years agoupstream: ssh does not accept -oInclude=... on the commandline, the
djm@openbsd.org [Fri, 6 Apr 2018 03:34:27 +0000 (03:34 +0000)] 
upstream: ssh does not accept -oInclude=... on the commandline, the

Include keyword is for configuration files only. bz#2840, patch from Jakub
Jelen

OpenBSD-Commit-ID: 32d052b4a7a7f22df35fe3f71c368c02b02cacb0

7 years agoupstream: We don't offer CBC cipher by default any more. Spotted by
djm@openbsd.org [Thu, 5 Apr 2018 22:54:28 +0000 (22:54 +0000)] 
upstream: We don't offer CBC cipher by default any more. Spotted by

Renaud Allard (via otto@)

OpenBSD-Commit-ID: a559b1eef741557dd959ae378b665a2977d92dca

7 years agoupstream: Update default IPQoS in ssh(1), sshd(8) to DSCP AF21 for
job@openbsd.org [Wed, 4 Apr 2018 15:12:17 +0000 (15:12 +0000)] 
upstream: Update default IPQoS in ssh(1), sshd(8) to DSCP AF21 for

interactive and CS1 for bulk

AF21 was selected as this is the highest priority within the low-latency
service class (and it is higher than what we have today). SSH is elastic
and time-sensitive data, where a user is waiting for a response via the
network in order to continue with a task at hand. As such, these flows
should be considered foreground traffic, with delays or drops to such
traffic directly impacting user-productivity.

For bulk SSH traffic, the CS1 "Lower Effort" marker was chosen to enable
networks implementing a scavanger/lower-than-best effort class to
discriminate scp(1) below normal activities, such as web surfing. In
general this type of bulk SSH traffic is a background activity.

An advantage of using "AF21" for interactive SSH and "CS1" for bulk SSH
is that they are recognisable values on all common platforms (IANA
https://www.iana.org/assignments/dscp-registry/dscp-registry.xml), and
for AF21 specifically a definition of the intended behavior exists
https://tools.ietf.org/html/rfc4594#section-4.7 in addition to the definition
of the Assured Forwarding PHB group https://tools.ietf.org/html/rfc2597, and
for CS1 (Lower Effort) there is https://tools.ietf.org/html/rfc3662

The first three bits of "AF21" map to the equivalent IEEEE 802.1D PCP, IEEE
802.11e, MPLS EXP/CoS and IP Precedence value of 2 (also known as "Immediate",
or "AC_BE"), and CS1's first 3 bits map to IEEEE 802.1D PCP, IEEE 802.11e,
MPLS/CoS and IP Precedence value 1 ("Background" or "AC_BK").

OK deraadt@, "no objection" djm@

OpenBSD-Commit-ID: d11d2a4484f461524ef0c20870523dfcdeb52181

7 years agoupstream: Import regenerated moduli file.
dtucker@openbsd.org [Tue, 3 Apr 2018 02:14:08 +0000 (02:14 +0000)] 
upstream: Import regenerated moduli file.

OpenBSD-Commit-ID: 1de0e85522051eb2ffa00437e1885e9d7b3e0c2e

7 years agoupstream: Add test for username options parsing order, prompted by
dtucker@openbsd.org [Fri, 6 Apr 2018 04:18:35 +0000 (04:18 +0000)] 
upstream: Add test for username options parsing order, prompted by

bz#2849.

OpenBSD-Regress-ID: 6985cd32f38596882a3ac172ff8c510693b65283

7 years agoExpose SSH_AUTH_INFO_0 to PAM auth modules
Damien Miller [Fri, 6 Apr 2018 04:11:44 +0000 (14:11 +1000)] 
Expose SSH_AUTH_INFO_0 to PAM auth modules

bz#2408, patch from Radoslaw Ejsmont; ok dtucker@

7 years agoImport regenerated moduli file.
Darren Tucker [Tue, 3 Apr 2018 02:18:00 +0000 (12:18 +1000)] 
Import regenerated moduli file.

7 years agoupdate versions in .spec files V_7_7_P1
Damien Miller [Mon, 2 Apr 2018 05:38:28 +0000 (15:38 +1000)] 
update versions in .spec files

7 years agoupdate version number
Damien Miller [Mon, 2 Apr 2018 05:38:20 +0000 (15:38 +1000)] 
update version number

7 years agoDisable native strndup and strnlen on AIX.
Darren Tucker [Fri, 30 Mar 2018 07:23:07 +0000 (18:23 +1100)] 
Disable native strndup and strnlen on AIX.

On at least some revisions of AIX, strndup returns unterminated strings
under some conditions, apparently because strnlen returns incorrect
values in those cases.  Disable both on AIX and use the replacements
from openbsd-compat.  Fixes problem with ECDSA keys there, ok djm.

7 years agoInclude ssh_api.h for struct ssh.
Darren Tucker [Mon, 26 Mar 2018 02:12:44 +0000 (13:12 +1100)] 
Include ssh_api.h for struct ssh.

struct ssh is needed by implementations of sys_auth_passwd() that were
converted in commit bba02a50.  Needed to fix build on AIX, I assume for
the other platforms too (although it should be harmless if not needed).

7 years agoRemove UNICOS code missed during removal.
Darren Tucker [Mon, 26 Mar 2018 01:58:09 +0000 (12:58 +1100)] 
Remove UNICOS code missed during removal.

Fixes compile error on AIX.

7 years agoupstream: openssh-7.7
markus@openbsd.org [Sat, 24 Mar 2018 19:29:03 +0000 (19:29 +0000)] 
upstream: openssh-7.7

OpenBSD-Commit-ID: 274e614352460b9802c905f38fb5ea7ed5db3d41

7 years agoRemove authinfo.sh test dependency on printenv
Damien Miller [Sun, 25 Mar 2018 22:37:02 +0000 (09:37 +1100)] 
Remove authinfo.sh test dependency on printenv

Some platforms lack printenv in the default $PATH.
Reported by Tom G. Christensen

7 years ago Use libiaf on all sysv5 systems
Tim Rice [Sun, 25 Mar 2018 17:00:21 +0000 (10:00 -0700)] 
Use libiaf on all sysv5 systems

7 years ago modified: auth-sia.c
Tim Rice [Sun, 25 Mar 2018 16:17:33 +0000 (09:17 -0700)] 
modified:   auth-sia.c
modified:   openbsd-compat/port-aix.c
modified:   openbsd-compat/port-uw.c

propogate changes to auth-passwd.c in commit
7c856857607112a3dfe6414696bf4c7ab7fb0cb3 to other providers
of sys_auth_passwd()

7 years agoupstream: openssh-7.7
markus@openbsd.org [Sat, 24 Mar 2018 19:29:03 +0000 (19:29 +0000)] 
upstream: openssh-7.7

OpenBSD-Commit-ID: 274e614352460b9802c905f38fb5ea7ed5db3d41

7 years agoupstream: fix bogus warning when signing cert keys using agent;
markus@openbsd.org [Sat, 24 Mar 2018 19:28:43 +0000 (19:28 +0000)] 
upstream: fix bogus warning when signing cert keys using agent;

from djm; ok deraadt dtucker

OpenBSD-Commit-ID: 12e50836ba2040042383a8b71e12d7ea06e9633d

7 years agoReplace /dev/stdin with "-".
Darren Tucker [Sat, 24 Mar 2018 22:40:46 +0000 (09:40 +1100)] 
Replace /dev/stdin with "-".

For some reason sftp -b doesn't work with /dev/stdin on Cygwin, as noted
and suggested by vinschen at redhat.com.

7 years agoProvide $OBJ to paths in PuTTY interop tests.
Darren Tucker [Fri, 23 Mar 2018 02:21:14 +0000 (13:21 +1100)] 
Provide $OBJ to paths in PuTTY interop tests.

7 years agoupstream: Tell puttygen to use /dev/urandom instead of /dev/random. On
dtucker@openbsd.org [Fri, 16 Mar 2018 09:06:31 +0000 (09:06 +0000)] 
upstream: Tell puttygen to use /dev/urandom instead of /dev/random. On

OpenBSD they are both non-blocking, but on many other -portable platforms it
blocks, stalling tests.

OpenBSD-Regress-ID: 397d0d4c719c353f24d79f5b14775e0cfdf0e1cc

7 years agoupstream: ssh/xmss: fix build; ok djm@
markus@openbsd.org [Thu, 22 Mar 2018 07:06:11 +0000 (07:06 +0000)] 
upstream: ssh/xmss: fix build; ok djm@

OpenBSD-Commit-ID: c9374ca41d4497f1c673ab681cc33f6e7c5dd186

7 years agoupstream: ssh/xmss: fix deserialize for certs; ok djm@
markus@openbsd.org [Thu, 22 Mar 2018 07:05:48 +0000 (07:05 +0000)] 
upstream: ssh/xmss: fix deserialize for certs; ok djm@

OpenBSD-Commit-ID: f44c41636c16ec83502039828beaf521c057dddc

7 years agoSave $? before case statement.
Darren Tucker [Thu, 22 Mar 2018 06:00:28 +0000 (17:00 +1100)] 
Save $? before case statement.

In some shells (FreeBSD 9, ash) the case statement resets $?, so save
for later testing.

7 years agoupstream: rename recently-added "valid-before" key restriction to
djm@openbsd.org [Wed, 14 Mar 2018 05:35:40 +0000 (05:35 +0000)] 
upstream: rename recently-added "valid-before" key restriction to

"expiry-time" as the former is confusing wrt similar terminology in X.509;
pointed out by jsing@

OpenBSD-Regress-ID: ac8b41dbfd90cffd525d58350c327195b0937793

7 years agoupstream: check valid-before option in authorized_keys
djm@openbsd.org [Mon, 12 Mar 2018 00:56:03 +0000 (00:56 +0000)] 
upstream: check valid-before option in authorized_keys

OpenBSD-Regress-ID: 7e1e4a84f7f099a290e5a4cbf4196f90ff2d7e11

7 years agoupstream: explicitly specify RSA/SHA-2 keytype here too
djm@openbsd.org [Mon, 12 Mar 2018 00:54:04 +0000 (00:54 +0000)] 
upstream: explicitly specify RSA/SHA-2 keytype here too

OpenBSD-Regress-ID: 74d7b24e8c72c27af6b481198344eb077e993a62

7 years agoupstream: exlicitly include RSA/SHA-2 keytypes in
djm@openbsd.org [Mon, 12 Mar 2018 00:52:57 +0000 (00:52 +0000)] 
upstream: exlicitly include RSA/SHA-2 keytypes in

PubkeyAcceptedKeyTypes here

OpenBSD-Regress-ID: 954d19e0032a74e31697fb1dc7e7d3d1b2d65fe9

7 years agoupstream: sort expiry-time;
jmc@openbsd.org [Wed, 14 Mar 2018 06:56:20 +0000 (06:56 +0000)] 
upstream: sort expiry-time;

OpenBSD-Commit-ID: 8c7d82ee1e63e26ceb2b3d3a16514019f984f6bf

7 years agoupstream: rename recently-added "valid-before" key restriction to
djm@openbsd.org [Wed, 14 Mar 2018 05:35:40 +0000 (05:35 +0000)] 
upstream: rename recently-added "valid-before" key restriction to

"expiry-time" as the former is confusing wrt similar terminology in X.509;
pointed out by jsing@

OpenBSD-Commit-ID: 376939466a1f562f3950a22314bc6505733aaae6

7 years agoupstream: add valid-before="[time]" authorized_keys option. A
djm@openbsd.org [Mon, 12 Mar 2018 00:52:01 +0000 (00:52 +0000)] 
upstream: add valid-before="[time]" authorized_keys option. A

simple way of giving a key an expiry date. ok markus@

OpenBSD-Commit-ID: 1793b4dd5184fa87f42ed33c7b0f4f02bc877947

7 years agoAdd AC_LANG_PROGRAM to AC_COMPILE_IFELSE.
Darren Tucker [Mon, 12 Mar 2018 08:17:26 +0000 (19:17 +1100)] 
Add AC_LANG_PROGRAM to AC_COMPILE_IFELSE.

The recently added MIPS ABI tests need AC_LANG_PROGRAM to prevent
warnings from autoconf.  Pointed out by klausz at haus-gisela.de.

7 years agoupstream: revert recent strdelim() change, it causes problems with
djm@openbsd.org [Wed, 7 Mar 2018 23:53:08 +0000 (23:53 +0000)] 
upstream: revert recent strdelim() change, it causes problems with

some configs.

revision 1.124
date: 2018/03/02 03:02:11;  author: djm;  state: Exp;  lines: +19 -8;  commitid: nNRsCijZiGG6SUTT;
Allow escaped quotes \" and \' in ssh_config and sshd_config quotes
option strings. bz#1596 ok markus@

OpenBSD-Commit-ID: 59c40b1b81206d713c06b49d8477402c86babda5

7 years agoupstream: move the input format details to -f; remove the output
jmc@openbsd.org [Mon, 5 Mar 2018 07:03:18 +0000 (07:03 +0000)] 
upstream: move the input format details to -f; remove the output

format details and point to sshd(8), where it is documented;

ok dtucker

OpenBSD-Commit-ID: 95f17e47dae02a6ac7329708c8c893d4cad0004a

7 years agoconfigure.ac: properly set seccomp_audit_arch for MIPS64
Vicente Olivert Riera [Tue, 20 Jun 2017 15:42:28 +0000 (16:42 +0100)] 
configure.ac: properly set seccomp_audit_arch for MIPS64

Currently seccomp_audit_arch is set to AUDIT_ARCH_MIPS64 or
AUDIT_ARCH_MIPSEL64 (depending on the endinness) when openssh is built
for MIPS64. However, that's only valid for n64 ABI. The right macros for
n32 ABI defined in seccomp.h are AUDIT_ARCH_MIPS64N32 and
AUDIT_ARCH_MIPSEL64N32, for big and little endian respectively.

Because of that an sshd built for MIPS64 n32 rejects connection attempts
and the output of strace reveals that the problem is related to seccomp
audit:

[pid   194] prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, {len=57,
filter=0x555d5da0}) = 0
[pid   194] write(7, "\0\0\0]\0\0\0\5\0\0\0Ulist_hostkey_types: "..., 97) = ?
[pid   193] <... poll resumed> )        = 2 ([{fd=5, revents=POLLIN|POLLHUP},
{fd=6, revents=POLLHUP}])
[pid   194] +++ killed by SIGSYS +++

This patch fixes that problem by setting the right value to
seccomp_audit_arch taking into account the MIPS64 ABI.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
7 years agoconfigure.ac: detect MIPS ABI
Vicente Olivert Riera [Tue, 20 Jun 2017 15:42:11 +0000 (16:42 +0100)] 
configure.ac: detect MIPS ABI

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
7 years agoUse https URLs for links that support it.
Alan Yee [Wed, 7 Mar 2018 23:12:14 +0000 (15:12 -0800)] 
Use https URLs for links that support it.

7 years agoDisable UTMPX on SunOS4.
Darren Tucker [Mon, 5 Mar 2018 09:03:07 +0000 (20:03 +1100)] 
Disable UTMPX on SunOS4.

7 years agoCheck for and work around buggy fflush(NULL).
Darren Tucker [Mon, 5 Mar 2018 08:28:08 +0000 (19:28 +1100)] 
Check for and work around buggy fflush(NULL).

Some really old platforms (eg SunOS4) segfault on fflush(NULL) so check
for and work around.  With klausz at haus-gisela.de.

7 years agoRemove extra XMSS #endif
Darren Tucker [Sun, 4 Mar 2018 23:22:32 +0000 (10:22 +1100)] 
Remove extra XMSS #endif

Extra #endif breaks compile with -DWITH_XMSS.  Pointed out by Jack
Schmidt via github.

7 years agoupstream: Update RSA minimum modulus size to 1024. sshkey.h rev 1.18
dtucker@openbsd.org [Sat, 3 Mar 2018 06:37:53 +0000 (06:37 +0000)] 
upstream: Update RSA minimum modulus size to 1024. sshkey.h rev 1.18

bumped the minimum from 768 to 1024, update man page accordingly.

OpenBSD-Commit-ID: 27563ab4e866cd2aac40a5247876f6787c08a338

7 years agoupstream: for the pty control tests, just check that the PTY path
djm@openbsd.org [Sun, 4 Mar 2018 01:46:48 +0000 (01:46 +0000)] 
upstream: for the pty control tests, just check that the PTY path

points to something in /dev (rather than checking the device node itself);
makes life easier for portable, where systems with dynamic ptys can delete
nodes before we get around to testing their existence.

OpenBSD-Regress-ID: b1e455b821e62572bccd98102f8dd9d09bb94994

7 years agoUpdate PAM password change to new opts API.
Darren Tucker [Sat, 3 Mar 2018 05:21:20 +0000 (16:21 +1100)] 
Update PAM password change to new opts API.

7 years agoAdd strndup for platforms that need it.
Darren Tucker [Sat, 3 Mar 2018 03:56:09 +0000 (14:56 +1100)] 
Add strndup for platforms that need it.

Some platforms don't have strndup, which includes Solaris 10, NetBSD 3
and FreeBSD 6.

7 years agoFlatten and alphabetize object file lists.
Darren Tucker [Sat, 3 Mar 2018 03:49:07 +0000 (14:49 +1100)] 
Flatten and alphabetize object file lists.

This will make maintenance and changes easier.  "no objection" tim@

7 years agoupstream: unit tests for new authorized_keys options API
djm@openbsd.org [Sat, 3 Mar 2018 03:16:17 +0000 (03:16 +0000)] 
upstream: unit tests for new authorized_keys options API

OpenBSD-Regress-ID: 820f9ec9c6301f6ca330ad4052d85f0e67d0bdc1

7 years agoupstream: fix testing of pty option, include positive test and
djm@openbsd.org [Fri, 2 Mar 2018 02:53:27 +0000 (02:53 +0000)] 
upstream: fix testing of pty option, include positive test and

testing of restrict keyword

OpenBSD-Regress-ID: 4268f27c2706a0a95e725d9518c5bcbec9814c6d

7 years agoupstream: better testing for port-forwarding and restrict flags in
djm@openbsd.org [Fri, 2 Mar 2018 02:51:55 +0000 (02:51 +0000)] 
upstream: better testing for port-forwarding and restrict flags in

authorized_keys

OpenBSD-Regress-ID: ee771df8955f2735df54746872c6228aff381daa

7 years agoupstream: switch over to the new authorized_keys options API and
djm@openbsd.org [Sat, 3 Mar 2018 03:15:51 +0000 (03:15 +0000)] 
upstream: switch over to the new authorized_keys options API and

remove the legacy one.

Includes a fairly big refactor of auth2-pubkey.c to retain less state
between key file lines.

feedback and ok markus@

OpenBSD-Commit-ID: dece6cae0f47751b9892080eb13d6625599573df

7 years agoupstream: Introduce a new API for handling authorized_keys options.
djm@openbsd.org [Sat, 3 Mar 2018 03:06:02 +0000 (03:06 +0000)] 
upstream: Introduce a new API for handling authorized_keys options.

This API parses options to a dedicated structure rather than the old API's
approach of setting global state. It also includes support for merging
options, e.g. from authorized_keys, authorized_principals and/or
certificates.

feedback and ok markus@

OpenBSD-Commit-ID: 98badda102cd575210d7802943e93a34232c80a2

7 years agoupstream: warn when the agent returns a signature type that was
djm@openbsd.org [Sat, 3 Mar 2018 03:01:50 +0000 (03:01 +0000)] 
upstream: warn when the agent returns a signature type that was

different to what was requested. This might happen when an old/non-OpenSSH
agent is asked to make a rsa-sha2-256/512 signature but only supports
ssh-rsa. bz#2799 feedback and ok markus@

OpenBSD-Commit-ID: 760c0f9438c5c58abc16b5f98008ff2d95cb13ce

7 years agoupstream: apply a lick of paint; tweaks/ok dtucker
jmc@openbsd.org [Fri, 2 Mar 2018 21:40:15 +0000 (21:40 +0000)] 
upstream: apply a lick of paint; tweaks/ok dtucker

OpenBSD-Commit-ID: 518a6736338045e0037f503c21027d958d05e703

7 years agoupstream: Allow escaped quotes \" and \' in ssh_config and
djm@openbsd.org [Fri, 2 Mar 2018 03:02:11 +0000 (03:02 +0000)] 
upstream: Allow escaped quotes \" and \' in ssh_config and

sshd_config quotes option strings. bz#1596 ok markus@

OpenBSD-Commit-ID: dd3a29fc2dc905e8780198e5a6a30b096de1a1cb

7 years agoupstream: refactor sshkey_read() to make it a little more, err,
djm@openbsd.org [Fri, 2 Mar 2018 02:08:03 +0000 (02:08 +0000)] 
upstream: refactor sshkey_read() to make it a little more, err,

readable. ok markus

OpenBSD-Commit-ID: 2e9247b5762fdac3b6335dc606d3822121714c28

7 years agoupstream: missing #ifdef for _PATH_HOST_XMSS_KEY_FILE; report by
markus@openbsd.org [Thu, 1 Mar 2018 20:32:16 +0000 (20:32 +0000)] 
upstream: missing #ifdef for _PATH_HOST_XMSS_KEY_FILE; report by

jmc@

OpenBSD-Commit-ID: 9039cb69a3f9886bfef096891a9e7fcbd620280b

7 years agoupstream: Remove unneeded (local) include. ok markus@
dtucker@openbsd.org [Mon, 26 Feb 2018 12:14:53 +0000 (12:14 +0000)] 
upstream: Remove unneeded (local) include. ok markus@

OpenBSD-Commit-ID: 132812dd2296b1caa8cb07d2408afc28e4e60f93

7 years agoupstream: Add $OpenBSD$ markers to xmss files to help keep synced
dtucker@openbsd.org [Mon, 26 Feb 2018 03:56:44 +0000 (03:56 +0000)] 
upstream: Add $OpenBSD$ markers to xmss files to help keep synced

with portable. ok djm@.

OpenBSD-Commit-ID: 5233a27aafd1dfadad4b957225f95ae51eb365c1

7 years agoupstream: Add newline at end of file to prevent compiler warnings.
dtucker@openbsd.org [Mon, 26 Feb 2018 03:03:05 +0000 (03:03 +0000)] 
upstream: Add newline at end of file to prevent compiler warnings.

OpenBSD-Commit-ID: 52f247d4eafe840c7c14c8befa71a760a8eeb063

7 years agoAdd WITH_XMSS, move to prevent conflicts.
Darren Tucker [Wed, 28 Feb 2018 08:59:35 +0000 (19:59 +1100)] 
Add WITH_XMSS, move to prevent conflicts.

Add #ifdef WITH_XMSS to ssh-xmss.c, move it in the other files to after
includes.h so it's less likely to conflict and will pick up WITH_XMSS if
added to config.h.

7 years agoConditionally compile XMSS code.
Darren Tucker [Tue, 27 Feb 2018 03:45:17 +0000 (14:45 +1100)] 
Conditionally compile XMSS code.

The XMSS code is currently experimental and, unlike the rest of OpenSSH
cannot currently be compiled with a c89 compiler.

7 years agoCheck dlopen has RTLD_NOW before enabling pkcs11.
Darren Tucker [Mon, 26 Feb 2018 01:51:29 +0000 (12:51 +1100)] 
Check dlopen has RTLD_NOW before enabling pkcs11.

7 years agoCheck for attributes on prototype args.
Darren Tucker [Mon, 26 Feb 2018 21:41:25 +0000 (08:41 +1100)] 
Check for attributes on prototype args.

Some compilers (gcc 2.9.53, 3.0 and probably others, see gcc bug #3481)
do not accept __attribute__ on function pointer prototype args.  Check for
this and hide them if they're not accepted.

7 years agoCheck if HAVE_DECL_BZERO correctly.
Darren Tucker [Mon, 26 Feb 2018 00:43:48 +0000 (11:43 +1100)] 
Check if HAVE_DECL_BZERO correctly.

7 years agoWrap <stdint.h> in #ifdef HAVE_STDINT_H.
Darren Tucker [Mon, 26 Feb 2018 06:42:56 +0000 (17:42 +1100)] 
Wrap <stdint.h> in #ifdef HAVE_STDINT_H.

7 years agoReplace $(CURDIR) with $(PWD).
Darren Tucker [Mon, 26 Feb 2018 05:24:23 +0000 (16:24 +1100)] 
Replace $(CURDIR) with $(PWD).

The former doesn't work on Solaris or BSDs.

7 years agoComment out hexdump().
Darren Tucker [Mon, 26 Feb 2018 03:51:59 +0000 (14:51 +1100)] 
Comment out hexdump().

Nothing currently uses them but they cause conflicts on at least
FreeBSD, possibly others.  ok djm@

7 years agotypo: missing ;
Darren Tucker [Mon, 26 Feb 2018 03:39:14 +0000 (14:39 +1100)] 
typo: missing ;

7 years agoHook up flock() compat code.
Darren Tucker [Mon, 26 Feb 2018 03:37:06 +0000 (14:37 +1100)] 
Hook up flock() compat code.

Also a couple of minor changes: fail if we can't lock instead of
silently succeeding, and apply a couple of minor style fixes.