]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
6 years agoupstream: process agent requests for RSA certificate private keys using V_8_0 anongit/V_8_0 github-selfhosted/V_8_0 github/V_8_0
djm@openbsd.org [Fri, 14 Jun 2019 03:51:47 +0000 (03:51 +0000)] 
upstream: process agent requests for RSA certificate private keys using

correct signature algorithm when requested. Patch from Jakub Jelen in bz3016
ok dtucker markus

OpenBSD-Commit-ID: 61f86efbeb4a1857a3e91298c1ccc6cf49b79624

6 years agoupstream: embiggen format buffer size for certificate serial number so
djm@openbsd.org [Mon, 20 May 2019 00:25:55 +0000 (00:25 +0000)] 
upstream: embiggen format buffer size for certificate serial number so

that it will fit a full 64 bit integer. bz#3012 from Manoel Domingues Junior

OpenBSD-Commit-ID: a51f3013056d05b976e5af6b978dcb9e27bbc12b

6 years agoAdd no-op implementation of pam_putenv.
Darren Tucker [Fri, 17 May 2019 03:14:12 +0000 (13:14 +1000)] 
Add no-op implementation of pam_putenv.

Some platforms such as HP-UX do not have pam_putenv.  Currently the
calls are ifdef'ed out, but a new one was recently added.  Remove the
ifdefs and add a no-op implementation.  bz#3008, ok djm.

6 years agoDon't install duplicate STREAMS modules on Solaris
Darren Tucker [Fri, 26 Apr 2019 08:06:34 +0000 (18:06 +1000)] 
Don't install duplicate STREAMS modules on Solaris

Check if STREAMS modules are already installed on pty before installing
since when compiling with XPG>=4 they will likely be installed already.
Prevents hangs and duplicate lines on the terminal.  bz#2945 and bz#2998,
patch from djm@

6 years agomakedepend V_8_0_P1
Damien Miller [Wed, 17 Apr 2019 22:52:57 +0000 (08:52 +1000)] 
makedepend

6 years agosecond thoughts: leave README in place
Damien Miller [Fri, 5 Apr 2019 18:29:51 +0000 (11:29 -0700)] 
second thoughts: leave README in place

A number of contrib/* files refer to the existing README so let's leave
it in place for release and add the new markdown version in parallel.

I'll get rid of README after release.

6 years agoRevert "rewrite README"
Damien Miller [Fri, 5 Apr 2019 18:29:31 +0000 (11:29 -0700)] 
Revert "rewrite README"

This reverts commit 9444d82678cb7781820da4d1c23b3c2b9fb1e12f.

6 years agorewrite README
Damien Miller [Fri, 5 Apr 2019 18:21:48 +0000 (11:21 -0700)] 
rewrite README

Include basic build instructions and comments on commonly-used build-
time flags, links to the manual pages and other resources.

Now in Markdown format for better viewing on github, etc.

6 years agoupdate versions
Damien Miller [Thu, 4 Apr 2019 16:41:52 +0000 (03:41 +1100)] 
update versions

6 years agoupstream: openssh-8.0
djm@openbsd.org [Wed, 3 Apr 2019 15:48:45 +0000 (15:48 +0000)] 
upstream: openssh-8.0

OpenBSD-Commit-ID: 5aafdf218679dab982fea20771afd643be9a127b

6 years agosession: Do not use removed API
Damien Miller [Wed, 3 Apr 2019 15:47:40 +0000 (02:47 +1100)] 
session: Do not use removed API

from Jakub Jelen

6 years agoupstream: when logging/fataling on error, include a bit more detail
djm@openbsd.org [Fri, 29 Mar 2019 11:31:40 +0000 (11:31 +0000)] 
upstream: when logging/fataling on error, include a bit more detail

than just the function name and the error message

OpenBSD-Commit-ID: dd72d7eba2215fcb89be516c378f633ea5bcca9f

6 years agoRemove "struct ssh" from sys_auth_record_login.
Darren Tucker [Tue, 2 Apr 2019 19:27:45 +0000 (06:27 +1100)] 
Remove "struct ssh" from sys_auth_record_login.

It's not needed, and is not available from the call site in loginrec.c
Should only affect AIX, spotted by Kevin Brott.

6 years agoAdapt custom_failed_login to new prototype.
Darren Tucker [Tue, 2 Apr 2019 07:21:35 +0000 (18:21 +1100)] 
Adapt custom_failed_login to new prototype.

Spotted by Kevin Brott.

6 years agoAdd includes.h for compat layer.
Darren Tucker [Mon, 1 Apr 2019 09:07:23 +0000 (20:07 +1100)] 
Add includes.h for compat layer.

Should fix build on AIX 7.2.

6 years agoStop USL compilers for erroring with "integral constant expression expected"
Tim Rice [Mon, 1 Apr 2019 05:14:22 +0000 (22:14 -0700)] 
Stop USL compilers for erroring with "integral constant expression expected"

6 years agoOnly use O_NOFOLLOW in fchownat and fchmodat if defined
Tim Rice [Mon, 1 Apr 2019 02:22:19 +0000 (19:22 -0700)] 
Only use O_NOFOLLOW in fchownat and fchmodat if defined

6 years agoAdjust softhsm2 path on Fedora Linux for regress
Jakub Jelen [Fri, 29 Mar 2019 11:29:41 +0000 (12:29 +0100)] 
Adjust softhsm2 path on Fedora Linux for regress

The SoftHSM lives in Fedora in /usr/lib64/pkcs11/libsofthsm2.so

6 years agoOnly use O_NOFOLLOW in utimensat if defined.
Darren Tucker [Wed, 27 Mar 2019 22:26:14 +0000 (09:26 +1100)] 
Only use O_NOFOLLOW in utimensat if defined.

Fixes build on systems that don't have it (Solaris <=9)  Found by
Tom G. Christensen.

6 years agodrop old Cygwin considerations
Corinna Vinschen [Wed, 27 Mar 2019 17:18:21 +0000 (18:18 +0100)] 
drop old Cygwin considerations

- Cygwin supports non-DOS characters in filenames
- Cygwin does not support Windows XP anymore

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
6 years agoupstream: fix interaction between ClientAliveInterval and RekeyLimit
djm@openbsd.org [Wed, 27 Mar 2019 09:29:14 +0000 (09:29 +0000)] 
upstream: fix interaction between ClientAliveInterval and RekeyLimit

that could cause connection to close incorrectly; Report and patch from Jakub
Jelen in bz#2757; ok dtucker@ markus@

OpenBSD-Commit-ID: 17229a8a65bd8e6c2080318ec2b7a61e1aede3fb

6 years agoupstream: Fix authentication failures when "AuthenticationMethods
djm@openbsd.org [Mon, 25 Mar 2019 22:34:52 +0000 (22:34 +0000)] 
upstream: Fix authentication failures when "AuthenticationMethods

any" in a Match block overrides a more restrictive global default.

Spotted by jmc@, ok markus@

OpenBSD-Commit-ID: a90a4fe2ab81d0eeeb8fdfc21af81f7eabda6666

6 years agoupstream: whitespace
djm@openbsd.org [Mon, 25 Mar 2019 22:33:44 +0000 (22:33 +0000)] 
upstream: whitespace

OpenBSD-Commit-ID: 106e853ae8a477e8385bc53824d3884a8159db07

6 years agoupstream: Expand comment to document rationale for default key
dtucker@openbsd.org [Mon, 25 Mar 2019 16:19:44 +0000 (16:19 +0000)] 
upstream: Expand comment to document rationale for default key

sizes. "seems worthwhile" deraadt.

OpenBSD-Commit-ID: 72e5c0983d7da1fb72f191870f36cb58263a2456

6 years agoupstream: Increase the default RSA key size to 3072 bits. Based on
dtucker@openbsd.org [Mon, 25 Mar 2019 15:49:00 +0000 (15:49 +0000)] 
upstream: Increase the default RSA key size to 3072 bits. Based on

the estimates from NIST Special Publication 800-57, 3k bits provides security
equivalent to 128 bits which is the smallest symmetric cipher we enable by
default. ok markus@ deraadt@

OpenBSD-Commit-ID: 461dd32ebe808f88f4fc3ec74749b0e6bef2276b

6 years agoupstream: full stop in the wrong place;
jmc@openbsd.org [Fri, 22 Mar 2019 20:58:34 +0000 (20:58 +0000)] 
upstream: full stop in the wrong place;

OpenBSD-Commit-ID: 478a0567c83553a2aebf95d0f1bd67ac1b1253e4

6 years agoupstream: benno helped me clean up the tcp forwarding section;
jmc@openbsd.org [Sat, 16 Mar 2019 19:14:21 +0000 (19:14 +0000)] 
upstream: benno helped me clean up the tcp forwarding section;

OpenBSD-Commit-ID: d4bec27edefde636fb632b7f0b7c656b9c7b7f08

6 years agoupstream: fix use-after-free in ssh-pkcs11; found by hshoexer w/AFL
markus@openbsd.org [Fri, 8 Mar 2019 17:24:43 +0000 (17:24 +0000)] 
upstream: fix use-after-free in ssh-pkcs11; found by hshoexer w/AFL

OpenBSD-Commit-ID: febce81cca72b71f70513fbee4ff52ca050f675c

6 years agoFix build when configured --without-openssl.
Darren Tucker [Wed, 13 Mar 2019 23:17:28 +0000 (10:17 +1100)] 
Fix build when configured --without-openssl.

ok djm@

6 years agoOn Cygwin run sshd as SYSTEM where possible.
Darren Tucker [Wed, 13 Mar 2019 21:51:17 +0000 (08:51 +1100)] 
On Cygwin run sshd as SYSTEM where possible.

Seteuid now creates user token using S4U.  We don't create a token
from scratch anymore, so we don't need the "Create a process token"
privilege.  The service can run under SYSTEM again...

...unless Cygwin is running on Windows Vista or Windows 7 in the
WOW64 32 bit emulation layer.  It turns out that WOW64 on these systems
didn't implement MsV1_0 S4U Logon so we still need the fallback
to NtCreateToken for these systems.

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
6 years agoReplace alloca with xcalloc.
Darren Tucker [Tue, 12 Mar 2019 23:49:16 +0000 (10:49 +1100)] 
Replace alloca with xcalloc.

The latter checks for memory exhaustion and integer overflow and may be
at a less predictable place.  Sanity check by vinschen at redhat.com, ok
djm@

6 years agoUse Cygwin-specific matching only for users+groups.
Darren Tucker [Mon, 11 Mar 2019 22:19:19 +0000 (09:19 +1100)] 
Use Cygwin-specific matching only for users+groups.

Patch from vinschen at redhat.com, updated a little by me.

6 years agoupstream: Move checks for lists of users or groups into their own
dtucker@openbsd.org [Wed, 6 Mar 2019 22:14:23 +0000 (22:14 +0000)] 
upstream: Move checks for lists of users or groups into their own

function. This is a no-op on OpenBSD but will make things easier in
-portable, eg on systems where these checks should be case-insensitive.  ok
djm@

OpenBSD-Commit-ID: 8bc9c8d98670e23f8eaaaefe29c1f98e7ba0487e

6 years agoupstream: Reset last-seen time when sending a keepalive. Prevents
dtucker@openbsd.org [Wed, 6 Mar 2019 21:06:59 +0000 (21:06 +0000)] 
upstream: Reset last-seen time when sending a keepalive. Prevents

sending two keepalives successively and prematurely terminating connection
when ClientAliveCount=1.  While there, collapse two similar tests into one.
ok markus@

OpenBSD-Commit-ID: 043670d201dfe222537a2a4bed16ce1087de5ddd

6 years agoupstream: PKCS#11 support is no longer limited to RSA; ok benno@
naddy@openbsd.org [Tue, 5 Mar 2019 16:17:12 +0000 (16:17 +0000)] 
upstream: PKCS#11 support is no longer limited to RSA; ok benno@

kn@

OpenBSD-Commit-ID: 1a9bec64d530aed5f434a960e7515a3e80cbc826

6 years agoupstream: in ssh_set_newkeys(), mention the direction that we're
djm@openbsd.org [Fri, 1 Mar 2019 03:29:32 +0000 (03:29 +0000)] 
upstream: in ssh_set_newkeys(), mention the direction that we're

keying in debug messages. Previously it would be difficult to tell which
direction it was talking about

OpenBSD-Commit-ID: c2b71bfcceb2a7389b9d0b497fb2122a406a522d

6 years agoupstream: Fix two race conditions in sshd relating to SIGHUP:
djm@openbsd.org [Fri, 1 Mar 2019 02:32:39 +0000 (02:32 +0000)] 
upstream: Fix two race conditions in sshd relating to SIGHUP:

1. Recently-forked child processes will briefly remain listening to
  listen_socks. If the main server sshd process completes its restart
  via execv() before these sockets are closed by the child processes
  then it can fail to listen at the desired addresses/ports and/or
  fail to restart.

2. When a SIGHUP is received, there may be forked child processes that
  are awaiting their reexecution state. If the main server sshd
  process restarts before passing this state, these child processes
  will yield errors and use a fallback path of reading the current
  sshd_config from the filesystem rather than use the one that sshd
  was started with.

To fix both of these cases, we reuse the startup_pipes that are shared
between the main server sshd and forked children. Previously this was
used solely to implement tracking of pre-auth child processes for
MaxStartups, but this extends the messaging over these pipes to include
a child->parent message that the parent process is safe to restart. This
message is sent from the child after it has completed its preliminaries:
closing listen_socks and receiving its reexec state.

bz#2953, reported by Michal Koutný; ok markus@ dtucker@

OpenBSD-Commit-ID: 7df09eacfa3ce13e9a7b1e9f17276ecc924d65ab

6 years agoupstream: mention PKCS11Provide=none, reword a little and remove
djm@openbsd.org [Fri, 1 Mar 2019 02:16:47 +0000 (02:16 +0000)] 
upstream: mention PKCS11Provide=none, reword a little and remove

mention of RSA keys only (since we support ECDSA now and might support others
in the future). Inspired by Jakub Jelen via bz#2974

OpenBSD-Commit-ID: a92e3686561bf624ccc64ab320c96c9e9a263aa5

6 years agoupstream: let PKCS11Provider=none do what users expect
djm@openbsd.org [Fri, 1 Mar 2019 02:08:50 +0000 (02:08 +0000)] 
upstream: let PKCS11Provider=none do what users expect

print PKCS11Provider instead of obsolete SmartcardDevice in config dump.

bz#2974 ok dtucker@

OpenBSD-Commit-ID: c303d6f0230a33aa2dd92dc9b68843d56a64f846

6 years agoupstream: dup stdout/in for proxycommand=-, otherwise stdout might
markus@openbsd.org [Wed, 27 Feb 2019 19:37:01 +0000 (19:37 +0000)] 
upstream: dup stdout/in for proxycommand=-, otherwise stdout might

be redirected to /dev/null; ok djm@

OpenBSD-Commit-ID: 97dfce4c47ed4055042de8ebde85b7d88793e595

6 years agoupstream: openssh-7.9 accidentally reused the server's algorithm lists
djm@openbsd.org [Sat, 23 Feb 2019 08:20:43 +0000 (08:20 +0000)] 
upstream: openssh-7.9 accidentally reused the server's algorithm lists

in the client for KEX, ciphers and MACs. The ciphers and MACs were identical
between the client and server, but the error accidentially disabled the
diffie-hellman-group-exchange-sha1 KEX method.

This fixes the client code to use the correct method list, but
because nobody complained, it also disables the
diffie-hellman-group-exchange-sha1 KEX method.

Reported by nuxi AT vault24.org via bz#2697; ok dtucker

OpenBSD-Commit-ID: e30c33a23c10fd536fefa120e86af1842e33fd57

6 years agoCygwin: implement case-insensitive Unicode user and group name matching
Corinna Vinschen [Wed, 20 Feb 2019 12:41:25 +0000 (13:41 +0100)] 
Cygwin: implement case-insensitive Unicode user and group name matching

The previous revert enabled case-insensitive user names again.  This
patch implements the case-insensitive user and group name matching.
To allow Unicode chars, implement the matcher using wchar_t chars in
Cygwin-specific code.  Keep the generic code changes as small as possible.
Cygwin: implement case-insensitive Unicode user and group name matching

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
6 years agoRevert unintended parts of previous commit.
Darren Tucker [Fri, 22 Feb 2019 04:21:21 +0000 (15:21 +1100)] 
Revert unintended parts of previous commit.

6 years agoRevert "[auth.c] On Cygwin, refuse usernames that have differences in case"
Corinna Vinschen [Wed, 20 Feb 2019 12:41:24 +0000 (13:41 +0100)] 
Revert "[auth.c] On Cygwin, refuse usernames that have differences in case"

This reverts commit acc9b29486dfd649dfda474e5c1a03b317449f1c.

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
6 years agoAdd tags to .gitignore
Corinna Vinschen [Sat, 16 Feb 2019 13:13:43 +0000 (14:13 +0100)] 
Add tags to .gitignore

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
6 years agoupstream: perform removal of agent-forwarding directory in forward
djm@openbsd.org [Fri, 22 Feb 2019 03:37:11 +0000 (03:37 +0000)] 
upstream: perform removal of agent-forwarding directory in forward

setup error path with user's privileged. This is a no-op as this code always
runs with user privilege now that we no longer support running sshd with
privilege separation disabled, but as long as the privsep skeleton is there
we should follow the rules.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

bz#2969 with patch from Erik Sjölund

OpenBSD-Commit-ID: 2b708401a5a8d6133c865d7698d9852210dca846

6 years agoupstream: sync the description of ~/.ssh/config with djm's updated
jmc@openbsd.org [Mon, 18 Feb 2019 07:02:34 +0000 (07:02 +0000)] 
upstream: sync the description of ~/.ssh/config with djm's updated

description in ssh.1; issue pointed out by andreas kahari

ok dtucker djm

OpenBSD-Commit-ID: 1b01ef0ae2c6328165150badae317ec92e52b01c

6 years agoupstream: fix regression in r1.302 reported by naddy@ - only the first
djm@openbsd.org [Tue, 12 Feb 2019 23:53:10 +0000 (23:53 +0000)] 
upstream: fix regression in r1.302 reported by naddy@ - only the first

public key from the agent was being attempted for use.

OpenBSD-Commit-ID: 07116aea521a04888718b2157f1ca723b2f46c8d

6 years agoupstream: cleanup GSSAPI authentication context after completion of the
djm@openbsd.org [Mon, 11 Feb 2019 09:44:42 +0000 (09:44 +0000)] 
upstream: cleanup GSSAPI authentication context after completion of the

authmethod. Move function-static GSSAPI state to the client Authctxt
structure. Make static a bunch of functions that aren't used outside this
file.

Based on patch from Markus Schmidt <markus@blueflash.cc>; ok markus@

OpenBSD-Commit-ID: 497fb792c0ddb4f1ba631b6eed526861f115dbe5

6 years agoupstream: ssh-keygen -D pkcs11.so needs to initialize pkcs11
benno@openbsd.org [Sun, 10 Feb 2019 16:35:41 +0000 (16:35 +0000)] 
upstream: ssh-keygen -D pkcs11.so needs to initialize pkcs11

interactive, so it can ask for the smartcards PIN. ok markus@

OpenBSD-Commit-ID: 1be7ccf88f1876e0fc4d7c9b3f96019ac5655bab

6 years agoupstream: when checking that filenames sent by the server side
djm@openbsd.org [Sun, 10 Feb 2019 11:15:52 +0000 (11:15 +0000)] 
upstream: when checking that filenames sent by the server side

match what the client requested, be prepared to handle shell-style brace
alternations, e.g. "{foo,bar}".

"looks good to me" millert@ + in snaps for the last week courtesy
deraadt@

OpenBSD-Commit-ID: 3b1ce7639b0b25b2248e3a30f561a548f6815f3e

6 years agoupstream: syslog when connection is dropped for attempting to run a
djm@openbsd.org [Sun, 10 Feb 2019 11:10:57 +0000 (11:10 +0000)] 
upstream: syslog when connection is dropped for attempting to run a

command when ForceCommand=internal-sftp is in effect; bz2960; ok dtucker@

OpenBSD-Commit-ID: 8c87fa66d7fc6c0fffa3a3c28e8ab5e8dde234b8

6 years agodon't set $MAIL if UsePam=yes
Damien Miller [Fri, 8 Feb 2019 03:53:35 +0000 (14:53 +1100)] 
don't set $MAIL if UsePam=yes

PAM typically specifies the user environment if it's enabled, so don't
second guess. bz#2937; ok dtucker@

6 years agouse same close logic for stderr as stdout
Damien Miller [Fri, 8 Feb 2019 03:50:36 +0000 (14:50 +1100)] 
use same close logic for stderr as stdout

Avoids sending SIGPIPE to child processes after their parent exits
if they attempt to write to stderr.

Analysis and patch from JD Paul; patch reworked by Jakub Jelen and
myself. bz#2071; ok dtucker@

6 years agoupstream: Adapt code in the non-USE_PIPES codepath to the new packet
dtucker@openbsd.org [Tue, 5 Feb 2019 11:35:56 +0000 (11:35 +0000)] 
upstream: Adapt code in the non-USE_PIPES codepath to the new packet

API. This code is not normally reachable since USE_PIPES is always defined.
bz#2961, patch from adrian.fita at gmail com.

OpenBSD-Commit-ID: 8d8428d678d1d5eb4bb21921df34e8173e6d238a

6 years agoupstream: fix NULL-deref crash in PKCS#11 code when attempting
djm@openbsd.org [Mon, 4 Feb 2019 23:37:54 +0000 (23:37 +0000)] 
upstream: fix NULL-deref crash in PKCS#11 code when attempting

login to a token requiring a PIN; reported by benno@ fix mostly by markus@

OpenBSD-Commit-ID: 438d0b114b1b4ba25a9869733db1921209aa9a31

6 years agoupstream: Remove obsolete "Protocol" from commented out examples. Patch
dtucker@openbsd.org [Mon, 4 Feb 2019 02:39:42 +0000 (02:39 +0000)] 
upstream: Remove obsolete "Protocol" from commented out examples. Patch

from samy.mahmoudi at gmail com.

OpenBSD-Commit-ID: 16aede33dae299725a03abdac5dcb4d73f5d0cbf

6 years agoupstream: Save connection timeout and restore for 2nd and
dtucker@openbsd.org [Fri, 1 Feb 2019 03:52:23 +0000 (03:52 +0000)] 
upstream: Save connection timeout and restore for 2nd and

subsequent attempts, preventing them from having no timeout.  bz#2918, ok
djm@

OpenBSD-Commit-ID: 4977f1d0521d9b6bba0c9a20d3d226cefac48292

6 years agoupstream: Add authors for public domain sntrup4591761 code;
markus@openbsd.org [Wed, 30 Jan 2019 19:51:15 +0000 (19:51 +0000)] 
upstream: Add authors for public domain sntrup4591761 code;

confirmed by Daniel J. Bernstein

OpenBSD-Commit-ID: b4621f22b8b8ef13e063c852af5e54dbbfa413c1

6 years agoupstream: add -T to usage();
jmc@openbsd.org [Sun, 27 Jan 2019 07:14:11 +0000 (07:14 +0000)] 
upstream: add -T to usage();

OpenBSD-Commit-ID: a7ae14d9436c64e1bd05022329187ea3a0ce1899

6 years agoupstream: The test sshd_config in in $OBJ.
dtucker@openbsd.org [Mon, 28 Jan 2019 03:50:39 +0000 (03:50 +0000)] 
upstream: The test sshd_config in in $OBJ.

OpenBSD-Regress-ID: 1e5d908a286d8e7de3a15a0020c8857f3a7c9172

6 years agoupstream: Remove leftover debugging.
dtucker@openbsd.org [Mon, 28 Jan 2019 03:28:10 +0000 (03:28 +0000)] 
upstream: Remove leftover debugging.

OpenBSD-Regress-ID: 3d86c3d4867e46b35af3fd2ac8c96df0ffdcfeb9

6 years agoupstream: Enable ssh-dss for the agent test. Disable it for the
dtucker@openbsd.org [Mon, 28 Jan 2019 00:12:36 +0000 (00:12 +0000)] 
upstream: Enable ssh-dss for the agent test. Disable it for the

certificate test.

OpenBSD-Regress-ID: 388c1e03e1def539d350f139b37d69f12334668d

6 years agoupstream: Count the number of key types instead of assuming there
dtucker@openbsd.org [Mon, 28 Jan 2019 00:08:26 +0000 (00:08 +0000)] 
upstream: Count the number of key types instead of assuming there

are only two.

OpenBSD-Regress-ID: 0998702c41235782cf0beee396ec49b5056eaed9

6 years agoCygwin: only tweak sshd_config file if it's new, drop creating sshd user
Corinna Vinschen [Sat, 26 Jan 2019 22:42:40 +0000 (23:42 +0100)] 
Cygwin: only tweak sshd_config file if it's new, drop creating sshd user

The sshd_config tweaks were executed even if the old file was
still in place.  Fix that.  Also disable sshd user creation.
It's not used on Cygwin.

6 years agoCygwin: Change service name to cygsshd
Corinna Vinschen [Sat, 26 Jan 2019 22:03:12 +0000 (23:03 +0100)] 
Cygwin: Change service name to cygsshd

Microsoft hijacked the sshd service name without asking.

6 years agoupstream: Generate all key supported key types and enable for keyscan
dtucker@openbsd.org [Sun, 27 Jan 2019 06:30:53 +0000 (06:30 +0000)] 
upstream: Generate all key supported key types and enable for keyscan

test.

OpenBSD-Regress-ID: 72f72ff49946c61bc949e1692dd9e3d71370891b

6 years agoupstream: check in scp client that filenames sent during
djm@openbsd.org [Sat, 26 Jan 2019 22:41:28 +0000 (22:41 +0000)] 
upstream: check in scp client that filenames sent during

remote->local directory copies satisfy the wildcard specified by the user.

This checking provides some protection against a malicious server
sending unexpected filenames, but it comes at a risk of rejecting wanted
files due to differences between client and server wildcard expansion rules.

For this reason, this also adds a new -T flag to disable the check.

reported by Harry Sintonen
fix approach suggested by markus@;
has been in snaps for ~1wk courtesy deraadt@

OpenBSD-Commit-ID: 00f44b50d2be8e321973f3c6d014260f8f7a8eda

6 years agoupstream: make ssh-keyscan return a non-zero exit status if it
djm@openbsd.org [Sat, 26 Jan 2019 22:35:01 +0000 (22:35 +0000)] 
upstream: make ssh-keyscan return a non-zero exit status if it

finds no keys. bz#2903

OpenBSD-Commit-ID: 89f1081fb81d950ebb48e6e73d21807b2723d488

6 years agoupstream: Accept the host key fingerprint as a synonym for "yes"
dtucker@openbsd.org [Thu, 24 Jan 2019 17:00:29 +0000 (17:00 +0000)] 
upstream: Accept the host key fingerprint as a synonym for "yes"

when accepting an unknown host key.  This allows you to paste a fingerprint
obtained out of band into the yes/no prompt and have the client do the
comparison for you.  ok markus@ djm@

OpenBSD-Commit-ID: 3c47d10b9f43d3d345e044fd9ec09709583a2767

6 years agoupstream: Have progressmeter force an update at the beginning and
dtucker@openbsd.org [Thu, 24 Jan 2019 16:52:17 +0000 (16:52 +0000)] 
upstream: Have progressmeter force an update at the beginning and

end of each transfer.  Fixes the problem recently introduces where very quick
transfers do not display the progressmeter at all.  Spotted by naddy@

OpenBSD-Commit-ID: 68dc46c259e8fdd4f5db3ec2a130f8e4590a7a9a

6 years agoupstream: Check for both EAGAIN and EWOULDBLOCK. This is a no-op
dtucker@openbsd.org [Thu, 24 Jan 2019 02:42:23 +0000 (02:42 +0000)] 
upstream: Check for both EAGAIN and EWOULDBLOCK. This is a no-op

in OpenBSD (they are the same value) but makes things easier in -portable
where they may be distinct values.  "sigh ok" deraadt@

(ID sync only, portable already had this change).

OpenBSD-Commit-ID: 91f2bc7c0ecec905915ed59fa37feb9cc90e17d7

6 years agoupstream: Always initialize 2nd arg to hpdelim2. It populates that
dtucker@openbsd.org [Thu, 24 Jan 2019 02:34:52 +0000 (02:34 +0000)] 
upstream: Always initialize 2nd arg to hpdelim2. It populates that

*ONLY IF* there's a delimiter.  If there's not (the common case) it checked
uninitialized memory, which usually passed, but if not would cause spurious
failures when the uninitialized memory happens to contain "/".  ok deraadt.

OpenBSD-Commit-ID: 4291611eaf2a53d4c92f4a57c7f267c9f944e0d3

6 years agoupstream: Remove support for obsolete host/port syntax.
dtucker@openbsd.org [Wed, 23 Jan 2019 21:50:56 +0000 (21:50 +0000)] 
upstream: Remove support for obsolete host/port syntax.

host/port was added in 2001 as an alternative to host:port syntax for
the benefit of IPv6 users.  These days there are establised standards
for this like [::1]:22 and the slash syntax is easily mistaken for CIDR
notation, which OpenSSH now supports for some things.  Remove the slash
notation from ListenAddress and PermitOpen.  bz#2335, patch from jjelen
at redhat.com, ok markus@

OpenBSD-Commit-ID: fae5f4e23c51a368d6b2d98376069ac2b10ad4b7

6 years agoupstream: Remove duplicate word. bz#2958, patch from jjelen at
dtucker@openbsd.org [Wed, 23 Jan 2019 20:48:52 +0000 (20:48 +0000)] 
upstream: Remove duplicate word. bz#2958, patch from jjelen at

redhat.com

OpenBSD-Commit-ID: cca3965a8333f2b6aae48b79ec1d72f7a830dd2c

6 years agoupstream: Remove 3 as a guess for possible generator during moduli
dtucker@openbsd.org [Wed, 23 Jan 2019 09:49:00 +0000 (09:49 +0000)] 
upstream: Remove 3 as a guess for possible generator during moduli

generation. It's not mentioned in RFC4419 and it's not possible for
Sophie-Germain primes greater than 5.  bz#2330, from Christian Wittenhorst ,
ok djm@ tb@

OpenBSD-Commit-ID: 1467652e6802ad3333b0959282d8d49dfe22c8cd

6 years agoupstream: Sanitize scp filenames via snmprintf. To do this we move
dtucker@openbsd.org [Wed, 23 Jan 2019 08:01:46 +0000 (08:01 +0000)] 
upstream: Sanitize scp filenames via snmprintf. To do this we move

the progressmeter formatting outside of signal handler context and have the
atomicio callback called for EINTR too.  bz#2434 with contributions from djm
and jjelen at redhat.com, ok djm@

OpenBSD-Commit-ID: 1af61c1f70e4f3bd8ab140b9f1fa699481db57d8

6 years agoFor broken read/readv comparisons, poll(RW).
Darren Tucker [Wed, 23 Jan 2019 23:00:20 +0000 (10:00 +1100)] 
For broken read/readv comparisons, poll(RW).

In the cases where we can't compare to read or readv function pointers
for some reason we currently ifdef out the poll() used to block while
waiting for reads or writes, falling back to busy waiting.  This restores
the poll() in this case, but has it always check for read or write,
removing an inline ifdef in the process.

6 years agoInclude unistd.h for strmode().
Darren Tucker [Wed, 23 Jan 2019 22:55:16 +0000 (09:55 +1100)] 
Include unistd.h for strmode().

6 years agoAlso undef SIMPLEQ_FOREACH_SAFE.
Darren Tucker [Wed, 23 Jan 2019 22:50:58 +0000 (09:50 +1100)] 
Also undef SIMPLEQ_FOREACH_SAFE.

Prevents macro redefinition warning on at least NetBSD 6.1.

6 years agoupstream: allow auto-incrementing certificate serial number for certs
djm@openbsd.org [Wed, 23 Jan 2019 04:51:02 +0000 (04:51 +0000)] 
upstream: allow auto-incrementing certificate serial number for certs

signed in a single commandline.

OpenBSD-Commit-ID: 39881087641efb8cd83c7ec13b9c98280633f45b

6 years agoupstream: move a bunch of global flag variables to main(); make the
djm@openbsd.org [Wed, 23 Jan 2019 04:16:22 +0000 (04:16 +0000)] 
upstream: move a bunch of global flag variables to main(); make the

rest static

OpenBSD-Commit-ID: fa431d92584e81fe99f95882f4c56b43fe3242dc

6 years agodepend
Damien Miller [Wed, 23 Jan 2019 02:03:16 +0000 (13:03 +1100)] 
depend

6 years agoupstream: switch mainloop from select(2) to poll(2); ok deraadt@
djm@openbsd.org [Wed, 23 Jan 2019 02:01:10 +0000 (02:01 +0000)] 
upstream: switch mainloop from select(2) to poll(2); ok deraadt@

OpenBSD-Commit-ID: 37645419a330037d297f6f0adc3b3663e7ae7b2e

6 years agoupstream: pass most arguments to the KEX hash functions as sshbuf
djm@openbsd.org [Wed, 23 Jan 2019 00:30:41 +0000 (00:30 +0000)] 
upstream: pass most arguments to the KEX hash functions as sshbuf

rather than pointer+length; ok markus@

OpenBSD-Commit-ID: ef0c89c52ccc89817a13a5205725148a28492bf7

6 years agoupstream: backoff reading messages from active connections when the
djm@openbsd.org [Tue, 22 Jan 2019 22:58:50 +0000 (22:58 +0000)] 
upstream: backoff reading messages from active connections when the

input buffer is too full to read one, or if the output buffer is too full to
enqueue a response; feedback & ok dtucker@

OpenBSD-Commit-ID: df3c5b6d57c968975875de40d8955cbfed05a6c8

6 years agoupstream: add -m to usage(); reminded by jmc@
djm@openbsd.org [Tue, 22 Jan 2019 20:48:01 +0000 (20:48 +0000)] 
upstream: add -m to usage(); reminded by jmc@

OpenBSD-Commit-ID: bca476a5236e8f94210290b3e6a507af0434613e

6 years agoupstream: Correct some bugs in PKCS#11 token PIN handling at
djm@openbsd.org [Tue, 22 Jan 2019 12:03:58 +0000 (12:03 +0000)] 
upstream: Correct some bugs in PKCS#11 token PIN handling at

initial login, the attempt at reading the PIN could be skipped in some cases
especially on devices with integrated PIN readers.

based on patch from Daniel Kucera in bz#2652; ok markus@

OpenBSD-Commit-ID: fad70a61c60610afe8bb0db538c90e343e75e58e

6 years agoupstream: Support keys that set the CKA_ALWAYS_AUTHENTICATE by
djm@openbsd.org [Tue, 22 Jan 2019 12:00:50 +0000 (12:00 +0000)] 
upstream: Support keys that set the CKA_ALWAYS_AUTHENTICATE by

requring a fresh login after the C_SignInit operation.

based on patch from Jakub Jelen in bz#2638; ok markus

OpenBSD-Commit-ID: a76e66996ba7c0923b46b74d46d499b811786661

6 years agoupstream: Mention that configuration for the destination host is
djm@openbsd.org [Tue, 22 Jan 2019 11:51:25 +0000 (11:51 +0000)] 
upstream: Mention that configuration for the destination host is

not applied to any ProxyJump/-J hosts. This has confused a few people...

OpenBSD-Commit-ID: 03f4f641df6ca236c1bfc69836a256b873db868b

6 years agoupstream: Include -m in the synopsis for a few more commands that
djm@openbsd.org [Tue, 22 Jan 2019 11:40:42 +0000 (11:40 +0000)] 
upstream: Include -m in the synopsis for a few more commands that

support it

Be more explicit in the description of -m about where it may be used

Prompted by Jakub Jelen in bz2904

OpenBSD-Commit-ID: 3b398ac5e05d8a6356710d0ff114536c9d71046c

6 years agoupstream: print the full pubkey being attempted at loglevel >=
djm@openbsd.org [Tue, 22 Jan 2019 11:26:16 +0000 (11:26 +0000)] 
upstream: print the full pubkey being attempted at loglevel >=

debug2; bz2939

OpenBSD-Commit-ID: ac0fe5ca1429ebf4d460bad602adc96de0d7e290

6 years agoupstream: clarify: ssh-keygen -e only writes public keys, never
djm@openbsd.org [Tue, 22 Jan 2019 11:19:42 +0000 (11:19 +0000)] 
upstream: clarify: ssh-keygen -e only writes public keys, never

private

OpenBSD-Commit-ID: 7de7ff6d274d82febf9feb641e2415ffd6a30bfb

6 years agoupstream: mention the new vs. old key formats in the introduction
djm@openbsd.org [Tue, 22 Jan 2019 11:00:15 +0000 (11:00 +0000)] 
upstream: mention the new vs. old key formats in the introduction

and give some hints on how keys may be converted or written in the old
format.

OpenBSD-Commit-ID: 9c90a9f92eddc249e07fad1204d0e15c8aa13823

6 years agoupstream: tweak previous;
jmc@openbsd.org [Tue, 22 Jan 2019 06:58:31 +0000 (06:58 +0000)] 
upstream: tweak previous;

OpenBSD-Commit-ID: d2a80e389da8e7ed71978643d8cbaa8605b597a8

6 years agoupstream: Forgot to add -J to the synopsis.
tb@openbsd.org [Mon, 21 Jan 2019 23:55:12 +0000 (23:55 +0000)] 
upstream: Forgot to add -J to the synopsis.

OpenBSD-Commit-ID: 26d95e409a0b72526526fc56ca1caca5cc3d3c5e

6 years agoupstream: Add a -J option as a shortcut for -o Proxyjump= to scp(1)
tb@openbsd.org [Mon, 21 Jan 2019 22:50:42 +0000 (22:50 +0000)] 
upstream: Add a -J option as a shortcut for -o Proxyjump= to scp(1)

and sftp(1) to match ssh(1)'s interface.

ok djm

OpenBSD-Commit-ID: a75bc2d5f329caa7229a7e9fe346c4f41c2663fc

6 years agoAllow building against OpenSSL dev (3.x) version.
Darren Tucker [Tue, 22 Jan 2019 09:38:40 +0000 (20:38 +1100)] 
Allow building against OpenSSL dev (3.x) version.

6 years agotypo
Damien Miller [Mon, 21 Jan 2019 23:50:40 +0000 (10:50 +1100)] 
typo

6 years agoadd missing header
Damien Miller [Mon, 21 Jan 2019 23:49:52 +0000 (10:49 +1100)] 
add missing header