]> git.ipfire.org Git - thirdparty/openssh-portable.git/log
thirdparty/openssh-portable.git
4 years agoupstream: fix type of nid in type_bits_valid(); github PR#202 from
djm@openbsd.org [Thu, 29 Oct 2020 03:01:18 +0000 (03:01 +0000)] 
upstream: fix type of nid in type_bits_valid(); github PR#202 from

github user thingsconnected

OpenBSD-Commit-ID: 769d2b040dec7ab32d323daf54b854dd5dcb5485

4 years agoupstream: whitespace; no code change
djm@openbsd.org [Thu, 29 Oct 2020 02:52:43 +0000 (02:52 +0000)] 
upstream: whitespace; no code change

OpenBSD-Commit-ID: efefc1c47e880887bdee8cd2127ca93177eaad79

4 years agoupstream: UpdateHostkeys: fixed/better detection of host keys that
djm@openbsd.org [Thu, 29 Oct 2020 02:47:23 +0000 (02:47 +0000)] 
upstream: UpdateHostkeys: fixed/better detection of host keys that

exist under other names and addresses; spotted by and debugged with lots of
help from jca@

OpenBSD-Commit-ID: 5113d7f550bbd48243db1705afbf16b63792d4b7

4 years agosession.c: use "denylist" terminology
Duncan Eastoe [Wed, 21 Oct 2020 09:11:10 +0000 (10:11 +0100)] 
session.c: use "denylist" terminology

Follow upstream (6d755706a0059eb9e2d63517f288b75cbc3b4701) language
improvements in this portable-specific code.

4 years agoRemove checks for strict POSIX mkdtemp()
Damien Miller [Tue, 27 Oct 2020 05:46:31 +0000 (16:46 +1100)] 
Remove checks for strict POSIX mkdtemp()

We needed a mkdtemp() that accepted template paths that did not
end in XXXXXX a long time ago for KRB4, but that code is long
deprecated. We no longer need to replace mkdtemp() for strictly
following POSIX. ok dtucker@

4 years agoupstream: Minor man page fixes (capitalization, commas) identified by
dtucker@openbsd.org [Mon, 26 Oct 2020 00:39:04 +0000 (00:39 +0000)] 
upstream: Minor man page fixes (capitalization, commas) identified by

the manpage-l10n project via bz#3223.  feedback deraadt@, ok jmc@

OpenBSD-Commit-ID: ab83af0daf18369244a72daaec6c4a58a9eb7e2c

4 years agoupstream: Adapt XMSS to new logging infrastructure. With markus@, ok
dtucker@openbsd.org [Mon, 19 Oct 2020 22:49:23 +0000 (22:49 +0000)] 
upstream: Adapt XMSS to new logging infrastructure. With markus@, ok

djm@.

OpenBSD-Commit-ID: 9c35ec3aa0f710e4e3325187ceff4fa3791686de

4 years agoupstream: fix SEGV on fatal() errors spotted by dtucker@
djm@openbsd.org [Mon, 19 Oct 2020 08:07:08 +0000 (08:07 +0000)] 
upstream: fix SEGV on fatal() errors spotted by dtucker@

OpenBSD-Commit-ID: 75f155a1ac61e364ed00dc379e2c42df81067ce2

4 years agoUse fatal_fr not fatal_r when passing r.
Darren Tucker [Sun, 18 Oct 2020 23:54:41 +0000 (10:54 +1100)] 
Use fatal_fr not fatal_r when passing r.

Caught by the PAM -Werror tinderbox build.

4 years agoupstream: use the new variant log macros instead of prepending
djm@openbsd.org [Sun, 18 Oct 2020 11:32:01 +0000 (11:32 +0000)] 
upstream: use the new variant log macros instead of prepending

__func__ and appending ssh_err(r) manually; ok markus@

OpenBSD-Commit-ID: 1f14b80bcfa85414b2a1a6ff714fb5362687ace8

4 years agoupstream: variants of the log methods that append a ssherr.h string
djm@openbsd.org [Sun, 18 Oct 2020 11:21:59 +0000 (11:21 +0000)] 
upstream: variants of the log methods that append a ssherr.h string

from a supplied error code; ok markus@

OpenBSD-Commit-ID: aed98c4435d48d036ae6740300f6a8357b7cc0bf

4 years agoupstream: remove a level of macro indirection; ok markus@
djm@openbsd.org [Sun, 18 Oct 2020 11:14:27 +0000 (11:14 +0000)] 
upstream: remove a level of macro indirection; ok markus@

OpenBSD-Commit-ID: 0c529d06e902c5d1a6b231e1bec6157f76dc67c9

4 years agoupstream: add some variant log.h calls that prepend the calling
djm@openbsd.org [Sun, 18 Oct 2020 11:13:45 +0000 (11:13 +0000)] 
upstream: add some variant log.h calls that prepend the calling

function name; ok markus@

OpenBSD-Commit-ID: 4be1b2e2455b271ddb7457bc195c5367644f4e48

4 years agomissing header
Damien Miller [Sat, 17 Oct 2020 11:55:24 +0000 (22:55 +1100)] 
missing header

4 years agosync regress/misc/sk-dummy/fatal.c
Damien Miller [Sat, 17 Oct 2020 11:47:52 +0000 (22:47 +1100)] 
sync regress/misc/sk-dummy/fatal.c

4 years agoupstream: make the log functions that exit (sshlogdie(),
djm@openbsd.org [Sat, 17 Oct 2020 01:28:20 +0000 (01:28 +0000)] 
upstream: make the log functions that exit (sshlogdie(),

sshfatal(), etc) have identical signatures. Makes things a bit more
consistent...

OpenBSD-Commit-ID: bd0ae124733389d7c0042e135c71ee9091362eb9

4 years agoupstream: add space between macro arg and punctuation;
jmc@openbsd.org [Fri, 16 Oct 2020 14:34:33 +0000 (14:34 +0000)] 
upstream: add space between macro arg and punctuation;

OpenBSD-Commit-ID: bb81e2ed5a77832fe62ab30a915ae67cda57633e

4 years agocheck for and require a C99 capable compiler
Damien Miller [Sat, 17 Oct 2020 01:03:34 +0000 (12:03 +1100)] 
check for and require a C99 capable compiler

recent logging changes use __VA_ARGS__.

4 years agologging is now macros, remove function pointers
Damien Miller [Sat, 17 Oct 2020 00:51:20 +0000 (11:51 +1100)] 
logging is now macros, remove function pointers

4 years agoadapt sk-dummy's fatal implementation to changes
Damien Miller [Sat, 17 Oct 2020 00:42:26 +0000 (11:42 +1100)] 
adapt sk-dummy's fatal implementation to changes

4 years agofix netcat build problem
Damien Miller [Sat, 17 Oct 2020 00:33:13 +0000 (11:33 +1100)] 
fix netcat build problem

4 years agoupstream: LogVerbose keyword for ssh and sshd
djm@openbsd.org [Fri, 16 Oct 2020 13:26:13 +0000 (13:26 +0000)] 
upstream: LogVerbose keyword for ssh and sshd

Allows forcing maximum debug logging by file/function/line pattern-
lists.

ok markus@

OpenBSD-Commit-ID: c294c25732d1b4fe7e345cb3e044df00531a6356

4 years agoupstream: revised log infrastructure for OpenSSH
djm@openbsd.org [Fri, 16 Oct 2020 13:24:45 +0000 (13:24 +0000)] 
upstream: revised log infrastructure for OpenSSH

log functions receive function, filename and line number of caller.
We can use this to selectively enable logging via pattern-lists.

ok markus@

OpenBSD-Commit-ID: 51a472610cbe37834ce6ce4a3f0e0b1ccc95a349

4 years agoupstream: use do_log2 instead of function pointers to different log
djm@openbsd.org [Fri, 16 Oct 2020 02:37:12 +0000 (02:37 +0000)] 
upstream: use do_log2 instead of function pointers to different log

functions

OpenBSD-Commit-ID: 88077b826d348c58352a6b394755520f4e484480

4 years agoupstream: make UpdateHostkeys still more conservative: refuse to
djm@openbsd.org [Wed, 14 Oct 2020 00:55:17 +0000 (00:55 +0000)] 
upstream: make UpdateHostkeys still more conservative: refuse to

proceed if one of the keys offered by the server is already in known_hosts
under another name. This avoid collisions between address entries for
different host aliases when CheckHostIP=yes

Also, do not attempt to fix known_hosts with incomplete host/ip matches
when there are no new or deprecated hostkeys.

OpenBSD-Commit-ID: 95c19842f7c41f9bd9c92aa6441a278c0fd0c4a3

4 years agoupstream: Zap unused family parameter from ssh_connect_direct()
kn@openbsd.org [Mon, 12 Oct 2020 08:36:36 +0000 (08:36 +0000)] 
upstream: Zap unused family parameter from ssh_connect_direct()

sshconnect.c r1.241 from 2013 made it unused;  found while reading code.

OK djm

OpenBSD-Commit-ID: 219ba6d7f9925d0b7992918612680399d86712b5

4 years agoshift contents of long $() into filter_ids()
Philip Hands [Sat, 3 Oct 2020 22:15:46 +0000 (00:15 +0200)] 
shift contents of long $() into filter_ids()

This was prompted by the fact that posh does not deal with $()
that contains comments where the comment includes an odd number
of single-quotes. It seems to get befuddled into trying to find
the matching quote.
Regardless, making a function for filtering the unneeded ids
seems much neater than avoiding apostrophes,
so that's what I've done.

SSH-Copy-ID-Upstream: 3dab3366a584427045c8a690a93282f02c09cf24

4 years agocombine if/elif to avoid duplication of the action
Philip Hands [Sat, 3 Oct 2020 21:15:16 +0000 (23:15 +0200)] 
combine if/elif to avoid duplication of the action

SSH-Copy-ID-Upstream: 42aeb1cc53d3f7f6e78edc210fb121fda0834914

4 years agoshellcheck tidyage
Philip Hands [Sat, 3 Oct 2020 19:45:16 +0000 (21:45 +0200)] 
shellcheck tidyage

SSH-Copy-ID-Upstream: 5b08f840e78ac544288b3983010a1b0585e966fd

4 years agotidy up test of $SCRATCH_DIR creation
Philip Hands [Sat, 3 Oct 2020 19:10:03 +0000 (21:10 +0200)] 
tidy up test of $SCRATCH_DIR creation

SSH-Copy-ID-Upstream: 2d8b22d96c105d87743ffe8874887b06f8989b93

4 years agoadd -s flag: to install keys via SFTP
Philip Hands [Wed, 16 Sep 2020 14:13:30 +0000 (16:13 +0200)] 
add -s flag: to install keys via SFTP

This is prompted by:

 https://bugzilla.mindrot.org/show_bug.cgi?id=3201

Thanks go to Matthias Blümel for the idea, and the helpful patch, from
which this patch grew.

SSH-Copy-ID-Upstream: f7c76dc64427cd20287a6868f672423b62057614

4 years agoupstream: UpdateHostkeys: check for keys under other names
djm@openbsd.org [Sun, 11 Oct 2020 22:14:38 +0000 (22:14 +0000)] 
upstream: UpdateHostkeys: check for keys under other names

Stop UpdateHostkeys from automatically removing deprecated keys from
known_hosts files if the same keys exist under a different name or
address to the host that is being connected to.

This avoids UpdateHostkeys from making known_hosts inconsistent in
some cases. For example, multiple host aliases sharing address-based
known_hosts on different lines, or hosts that resolves to multiple
addresses.

ok markus@

OpenBSD-Commit-ID: 6444a705ba504c3c8ccddccd8d1b94aa33bd11c1

4 years agoupstream: UpdateHostkeys: better CheckHostIP handling
djm@openbsd.org [Sun, 11 Oct 2020 22:13:37 +0000 (22:13 +0000)] 
upstream: UpdateHostkeys: better CheckHostIP handling

When preparing to update the known_hosts file, fully check both
entries for both the host and the address (if CheckHostIP enabled)
and ensure that, at the end of the operation, entries for both are
recorded.

Make sure this works with HashKnownHosts too, which requires maintaining
a list of entry-types seen across the whole file for each key.

ok markus@

OpenBSD-Commit-ID: 374dc263103f6b343d9671f87dbf81ffd0d6abdd

4 years agoupstream: UpdateHostkeys: better detect manual host entries
djm@openbsd.org [Sun, 11 Oct 2020 22:12:44 +0000 (22:12 +0000)] 
upstream: UpdateHostkeys: better detect manual host entries

Disable UpdateHostkeys if the known_hosts line has more than two
entries in the pattern-list. ssh(1) only writes "host" or "host,ip"
lines so anything else was added by a different tool or by a human.

ok markus@

OpenBSD-Commit-ID: e434828191fb5f3877d4887c218682825aa59820

4 years agoupstream: don't misdetect comma-separated hostkey names as wildcards;
djm@openbsd.org [Thu, 8 Oct 2020 01:15:16 +0000 (01:15 +0000)] 
upstream: don't misdetect comma-separated hostkey names as wildcards;

spotted by naddy@

OpenBSD-Commit-ID: 4b874edfec7fc324a21b130bdb42f912177739ce

4 years agofix TEST_MALLOC_OPTIONS var
wangxp006 [Thu, 8 Oct 2020 09:49:59 +0000 (17:49 +0800)] 
fix TEST_MALLOC_OPTIONS var

4 years agoupstream: clarify conditions for UpdateHostkeys
djm@openbsd.org [Thu, 8 Oct 2020 00:31:05 +0000 (00:31 +0000)] 
upstream: clarify conditions for UpdateHostkeys

OpenBSD-Commit-ID: 9cba714cf6aeed769f998ccbe8c483077a618e27

4 years agoupstream: remove GlobalKnownHostsFile for this test after
djm@openbsd.org [Wed, 7 Oct 2020 06:38:16 +0000 (06:38 +0000)] 
upstream: remove GlobalKnownHostsFile for this test after

UpdateHostkeys change

OpenBSD-Regress-ID: a940ad79d59343319613ba8fc46b6ef24aa3f8e1

4 years agoupstream: Disable UpdateHostkeys when hostkey checking fails
djm@openbsd.org [Wed, 7 Oct 2020 02:26:28 +0000 (02:26 +0000)] 
upstream: Disable UpdateHostkeys when hostkey checking fails

If host key checking fails (i.e. a wrong host key is recorded for the
server) and the user elects to continue (via StrictHostKeyChecking=no),
then disable UpdateHostkeys for the session.

reminded by Mark D. Baushke; ok markus@

OpenBSD-Commit-ID: 98b524f121f4252309dd21becd8c4cacb0c6042a

4 years agoupstream: Fix UpdateHostkeys/HashKnownHosts/CheckHostIP bug
djm@openbsd.org [Wed, 7 Oct 2020 02:25:43 +0000 (02:25 +0000)] 
upstream: Fix UpdateHostkeys/HashKnownHosts/CheckHostIP bug

When all of UpdateHostkeys, HashKnownHosts and ChechHostIP
were enabled and new host keys were learned, known_hosts IP
entries were not being recorded for new host keys.

reported by matthieu@ ok markus@

OpenBSD-Commit-ID: a654a8290bd1c930aac509e8158cf85e42e49cb7

4 years agoupstream: don't UpdateHostkeys when the hostkey is verified by the
djm@openbsd.org [Wed, 7 Oct 2020 02:24:51 +0000 (02:24 +0000)] 
upstream: don't UpdateHostkeys when the hostkey is verified by the

GlobalKnownHostsFile file, support only UserKnownHostsFile matches

suggested by Mark D. Baushke; feedback and ok markus@

OpenBSD-Commit-ID: eabb771a6add676c398d38a143a1aff5f04abbb9

4 years agoupstream: revert kex->flags cert hostkey downgrade back to a plain
djm@openbsd.org [Wed, 7 Oct 2020 02:22:23 +0000 (02:22 +0000)] 
upstream: revert kex->flags cert hostkey downgrade back to a plain

key (commitid VtF8vozGOF8DMKVg). We now do this a simpler way that needs less
plumbing.

ok markus@

OpenBSD-Commit-ID: fb92d25b216bff8c136da818ac2221efaadf18ed

4 years agoupstream: simply disable UpdateHostkeys when a certificate
djm@openbsd.org [Wed, 7 Oct 2020 02:20:35 +0000 (02:20 +0000)] 
upstream: simply disable UpdateHostkeys when a certificate

successfully authenticated the host; simpler than the complicated plumbing
via kex->flags we have now.

ok markus@

OpenBSD-Commit-ID: 80e39644eed75717d563a7f177e8117a0e14f42c

4 years agoupstream: disable UpdateHostkeys by default if VerifyHostKeyDNS is
djm@openbsd.org [Wed, 7 Oct 2020 02:18:45 +0000 (02:18 +0000)] 
upstream: disable UpdateHostkeys by default if VerifyHostKeyDNS is

enabled; suggested by Mark D. Baushke

OpenBSD-Commit-ID: 85a1b88592c81bc85df7ee7787dbbe721a0542bf

4 years agoupstream: Agent protocol draft is now at rev 4. ok djm@
dtucker@openbsd.org [Tue, 6 Oct 2020 07:12:04 +0000 (07:12 +0000)] 
upstream: Agent protocol draft is now at rev 4. ok djm@

OpenBSD-Commit-ID: 8c01ea3aae48aab45e01b7421b0fca2dad5e7837

4 years agoupstream: when ordering host key algorithms in the client, consider
djm@openbsd.org [Sun, 4 Oct 2020 09:45:01 +0000 (09:45 +0000)] 
upstream: when ordering host key algorithms in the client, consider

the ECDSA key subtype; ok markus@

OpenBSD-Commit-ID: 3097686f853c61ff61772ea35f8b699931392ece

4 years agoupstream: Allow full range of UIDs and GIDs for sftp chown and
dtucker@openbsd.org [Sun, 4 Oct 2020 03:04:02 +0000 (03:04 +0000)] 
upstream: Allow full range of UIDs and GIDs for sftp chown and

chgrp on 32bit platforms instead of being limited by LONG_MAX.  bz#3206,
found by booking00 at sina.cn, ok markus@

OpenBSD-Commit-ID: 373b7bbf1f15ae482d39567ce30d18b51c9229b5

4 years agoupstream: There are lots of place where we want to redirect stdin,
djm@openbsd.org [Sat, 3 Oct 2020 09:22:26 +0000 (09:22 +0000)] 
upstream: There are lots of place where we want to redirect stdin,

stdout and/or stderr to /dev/null. Factor all these out to a single
stdfd_devnull() function that allows selection of which of these to redirect.
ok markus@

OpenBSD-Commit-ID: 3033ba5a4c47cacfd5def020d42cabc52fad3099

4 years agoupstream: enable UpdateHostkeys by default when the configuration
djm@openbsd.org [Sat, 3 Oct 2020 08:30:47 +0000 (08:30 +0000)] 
upstream: enable UpdateHostkeys by default when the configuration

has not overridden UserKnownHostsFile; ok markus@ "The timing is perfect"
deraadt@

OpenBSD-Commit-ID: 62df71c9c5242da5763cb473c2a2deefbd0cef60

4 years agoupstream: disable UpdateHostkeys when a wildcard hostname pattern
djm@openbsd.org [Sat, 3 Oct 2020 08:12:59 +0000 (08:12 +0000)] 
upstream: disable UpdateHostkeys when a wildcard hostname pattern

is encountered or when a certificate host key is in use. feedback/ok markus@

OpenBSD-Commit-ID: b6e5575af7e6732322be82ec299e09051a5413bd

4 years agoupstream: record when the host key checking code downgrades a
djm@openbsd.org [Sat, 3 Oct 2020 08:11:28 +0000 (08:11 +0000)] 
upstream: record when the host key checking code downgrades a

certificate host key to a plain key. This occurs when the user connects to a
host with a certificate host key but no corresponding CA key configured in
known_hosts; feedback and ok markus@

OpenBSD-Commit-ID: 2ada81853ff9ee7824c62f440bcf4ad62030c901

4 years agoupstream: prefer ed25519 signature algorithm variants to ECDSA; ok
djm@openbsd.org [Sat, 3 Oct 2020 04:15:06 +0000 (04:15 +0000)] 
upstream: prefer ed25519 signature algorithm variants to ECDSA; ok

markus@

OpenBSD-Commit-ID: 82187926fca96d35a5b5afbc091afa84e0966e5b

4 years agoupstream: want time.h here too
djm@openbsd.org [Sat, 3 Oct 2020 03:40:38 +0000 (03:40 +0000)] 
upstream: want time.h here too

OpenBSD-Commit-ID: fafee8f1108c64ad8b282f9a1ed5ea830d8c58a7

4 years agoupstream: split introductory paragraph, and insert ominous words about
deraadt@openbsd.org [Sat, 3 Oct 2020 02:18:33 +0000 (02:18 +0000)] 
upstream: split introductory paragraph, and insert ominous words about

the glob issue, which cannot be fully fixed and really requires completely
replacing scp with a completely different subsystem. team effort to find the
right words..

OpenBSD-Commit-ID: 58e1f72d292687f63eb357183036ee242513691c

4 years agouse relative rather than system include here
Damien Miller [Sat, 3 Oct 2020 03:38:55 +0000 (13:38 +1000)] 
use relative rather than system include here

4 years agoadd some openbsd-compat licenses we missed
Damien Miller [Sat, 3 Oct 2020 03:38:41 +0000 (13:38 +1000)] 
add some openbsd-compat licenses we missed

4 years agoun-nest $() to make ksh cheerful
Philip Hands [Fri, 2 Oct 2020 22:20:07 +0000 (00:20 +0200)] 
un-nest $() to make ksh cheerful

4 years agoksh doesn't grok 'local'
Philip Hands [Fri, 2 Oct 2020 19:30:10 +0000 (21:30 +0200)] 
ksh doesn't grok 'local'

and AFAICT it's not actually doing anything useful in the code, so let's
see how things go without it.

4 years agoFix `EOF: command not found` error in ssh-copy-id
Oleg [Thu, 1 Oct 2020 09:09:08 +0000 (12:09 +0300)] 
Fix `EOF: command not found` error in ssh-copy-id

4 years agoupstream: Regen moduli.
dtucker@openbsd.org [Wed, 30 Sep 2020 09:11:39 +0000 (09:11 +0000)] 
upstream: Regen moduli.

OpenBSD-Commit-ID: 04967f8c43e9854ac34b917bcd6f5ac96c53a693

4 years agoRestore first section title of INSTALL
HARUYAMA Seigo [Sun, 27 Sep 2020 11:06:20 +0000 (20:06 +0900)] 
Restore first section title of INSTALL

4 years agoupdate version numbers V_8_4 anongit/V_8_4 github-selfhosted/V_8_4 github/V_8_4 V_8_4_P1
Damien Miller [Sun, 27 Sep 2020 07:25:01 +0000 (17:25 +1000)] 
update version numbers

4 years agoupstream: openssh 8.4
djm@openbsd.org [Sun, 27 Sep 2020 07:22:05 +0000 (07:22 +0000)] 
upstream: openssh 8.4

OpenBSD-Commit-ID: a29e5b372d2c00e297da8a35a3b87c9beb3b4a58

4 years agosync with upstream ssh-copy-id rev f0da1a1b7
Damien Miller [Tue, 22 Sep 2020 00:07:43 +0000 (10:07 +1000)] 
sync with upstream ssh-copy-id rev f0da1a1b7

4 years agoupstream: close stdin when forking after authentication too; ok markus
djm@openbsd.org [Mon, 21 Sep 2020 07:29:09 +0000 (07:29 +0000)] 
upstream: close stdin when forking after authentication too; ok markus

OpenBSD-Commit-ID: 43db17e4abc3e6b4a7b033aa8cdab326a7cb6c24

4 years agoupstream: close stdout/stderr after "ssh -f ..." forking
djm@openbsd.org [Sun, 20 Sep 2020 23:31:46 +0000 (23:31 +0000)] 
upstream: close stdout/stderr after "ssh -f ..." forking

bz#3137, ok markus

OpenBSD-Commit-ID: e2d83cc4dea1665651a7aa924ad1ed6bcaaab3e2

4 years ago.depend
Damien Miller [Sun, 20 Sep 2020 05:57:09 +0000 (15:57 +1000)] 
.depend

4 years agoupstream: cap channel input buffer size at 16MB; avoids high memory use
djm@openbsd.org [Sun, 20 Sep 2020 05:47:25 +0000 (05:47 +0000)] 
upstream: cap channel input buffer size at 16MB; avoids high memory use

when peer advertises a large window but is slow to consume the data we send
(e.g. because of a slow network)

reported by Pierre-Yves David

fix with & ok markus@

OpenBSD-Commit-ID: 1452771f5e5e768876d3bfe2544e3866d6ade216

4 years agolibfido2 1.5.0 is recommended
Damien Miller [Fri, 18 Sep 2020 12:02:53 +0000 (22:02 +1000)] 
libfido2 1.5.0 is recommended

4 years agoupstream: handle multiple messages in a single read()
djm@openbsd.org [Fri, 18 Sep 2020 08:16:38 +0000 (08:16 +0000)] 
upstream: handle multiple messages in a single read()

PR#183 by Dennis Kaarsemaker; feedback and ok markus@

OpenBSD-Commit-ID: 8570bb4d02d00cf70b98590716ea6a7d1cce68d1

4 years agoconfigure.ac: add missing includes 203/head
pedro martelletto [Fri, 18 Sep 2020 06:57:29 +0000 (08:57 +0200)] 
configure.ac: add missing includes

when testing, make sure to include the relevant header files that
declare the types of the functions used by the test:

- stdio.h for printf();
- stdlib.h for exit();
- string.h for strcmp();
- unistd.h for unlink(), _exit(), fork(), getppid(), sleep().

4 years agoupstream: tweak the client hostkey preference ordering algorithm to
djm@openbsd.org [Fri, 18 Sep 2020 05:23:03 +0000 (05:23 +0000)] 
upstream: tweak the client hostkey preference ordering algorithm to

prefer the default ordering if the user has a key that matches the
best-preference default algorithm.

feedback and ok markus@

OpenBSD-Commit-ID: a92dd7d7520ddd95c0a16786a7519e6d0167d35f

4 years agocontrol over the colours in gnome-ssh-askpass[23]
Damien Miller [Fri, 18 Sep 2020 04:55:48 +0000 (14:55 +1000)] 
control over the colours in gnome-ssh-askpass[23]

Optionally set the textarea colours via $GNOME_SSH_ASKPASS_FG_COLOR and
$GNOME_SSH_ASKPASS_BG_COLOR. These accept the usual three or six digit
hex colours.

4 years agofocus improvement for gnome-ssh-askpass[23]
Damien Miller [Fri, 18 Sep 2020 04:50:38 +0000 (14:50 +1000)] 
focus improvement for gnome-ssh-askpass[23]

When serving a SSH_ASKPASS_PROMPT=none information dialog, ensure
then <enter> doesn't immediately close the dialog. Instead, require an
explicit <tab> to reach the close button, or <esc>.

4 years agoupstream: Remove unused buf, last user was removed when switching
dtucker@openbsd.org [Wed, 16 Sep 2020 03:07:31 +0000 (03:07 +0000)] 
upstream: Remove unused buf, last user was removed when switching

to the sshbuf API. Patch from Sebastian Andrzej Siewior.

OpenBSD-Commit-ID: 250fa17f0cec01039cc4abd95917d9746e24c889

4 years agoupstream: For the hostkey confirmation message:
djm@openbsd.org [Wed, 9 Sep 2020 21:57:27 +0000 (21:57 +0000)] 
upstream: For the hostkey confirmation message:

> Are you sure you want to continue connecting (yes/no/[fingerprint])?

compare the fingerprint case sensitively; spotted Patrik Lundin
ok dtucker

OpenBSD-Commit-ID: 73097afee1b3a5929324e345ba4a4a42347409f2

4 years agoNew config-build-time dependency on automake.
Darren Tucker [Fri, 11 Sep 2020 04:45:23 +0000 (14:45 +1000)] 
New config-build-time dependency on automake.

4 years agoAdd aclocal.m4 and config.h.in~ to .gitignore.
Darren Tucker [Sun, 6 Sep 2020 11:56:36 +0000 (21:56 +1000)] 
Add aclocal.m4 and config.h.in~ to .gitignore.

aclocal.m4 is now generated by autoreconf.

4 years agoQuote the definition of OSSH_CHECK_HEADER_FOR_FIELD
Sebastian Andrzej Siewior [Sat, 5 Sep 2020 15:50:03 +0000 (17:50 +0200)] 
Quote the definition of OSSH_CHECK_HEADER_FOR_FIELD

autoreconf complains about underquoted definition of
OSSH_CHECK_HEADER_FOR_FIELD after aclocal.m4 has been and now is beeing
recreated.

Quote OSSH_CHECK_HEADER_FOR_FIELD as suggested.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
4 years agoMove the local m4 macros
Sebastian Andrzej Siewior [Sat, 5 Sep 2020 15:50:02 +0000 (17:50 +0200)] 
Move the local m4 macros

The `aclocal' step is skipped during `autoreconf' because aclocal.m4 is
present.
Move the current aclocal.m4 which contains local macros into the m4/
folder. With this change the aclocal.m4 will be re-created during
changes to the m4/ macro.
This is needed so the `aclocal' can fetch m4 macros from the system if
they are references in the configure script. This is a prerequisite to
use PKG_CHECK_MODULES.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
4 years agoRemove HAVE_MMAP and BROKEN_MMAP
Sebastian Andrzej Siewior [Sat, 5 Sep 2020 15:50:01 +0000 (17:50 +0200)] 
Remove HAVE_MMAP and BROKEN_MMAP

BROKEN_MMAP is no longer defined since commit
   1cfd5c06efb12 ("Remove portability support for mmap")

this commit also removed other HAVE_MMAP user. I didn't find anything
that defines HAVE_MMAP. The check does not trigger because compression
on server side is by default COMP_DELAYED (2) so it never triggers.

Remove remaining HAVE_MMAP and BROKEN_MMAP bits.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
4 years agoupstream: adapt to SSH_SK_VERSION_MAJOR crank
djm@openbsd.org [Wed, 9 Sep 2020 03:10:21 +0000 (03:10 +0000)] 
upstream: adapt to SSH_SK_VERSION_MAJOR crank

OpenBSD-Regress-ID: 0f3e76bdc8f9dbd9d22707c7bdd86051d5112ab8

4 years agoupstream: Ensure that address/mask mismatches are flagged at
dtucker@openbsd.org [Fri, 28 Aug 2020 03:17:13 +0000 (03:17 +0000)] 
upstream: Ensure that address/mask mismatches are flagged at

config-check time. ok djm@

OpenBSD-Regress-ID: 8f5f4c2c0bf00e6ceae7a1755a444666de0ea5c2

4 years agoupstream: when writing an attestation blob for a FIDO key, record all
djm@openbsd.org [Wed, 9 Sep 2020 03:08:01 +0000 (03:08 +0000)] 
upstream: when writing an attestation blob for a FIDO key, record all

the data needed to verify the attestation. Previously we were missing the
"authenticator data" that is included in the signature.

spotted by Ian Haken
feedback Pedro Martelletto and Ian Haken; ok markus@

OpenBSD-Commit-ID: 8439896e63792b2db99c6065dd9a45eabbdb7e0a

4 years agoconfigure.ac: fix libfido2 back-compat
pedro martelletto [Tue, 1 Sep 2020 15:01:55 +0000 (17:01 +0200)] 
configure.ac: fix libfido2 back-compat

- HAVE_FIDO_CRED_PROD -> HAVE_FIDO_CRED_PROT;
- check for fido_dev_get_touch_begin(), so that
  HAVE_FIDO_DEV_GET_TOUCH_BEGIN gets defined.

4 years agoupstream: refuse to add verify-required (PINful) FIDO keys to
djm@openbsd.org [Mon, 31 Aug 2020 04:33:17 +0000 (04:33 +0000)] 
upstream: refuse to add verify-required (PINful) FIDO keys to

ssh-agent until the agent supports them properly

OpenBSD-Commit-ID: 125bd55a8df32c87c3ec33c6ebe437673a3d037e

4 years agoupstream: Add RCS IDs to the few files that are missing them; from
djm@openbsd.org [Mon, 31 Aug 2020 00:17:41 +0000 (00:17 +0000)] 
upstream: Add RCS IDs to the few files that are missing them; from

Pedro Martelletto

OpenBSD-Commit-ID: 39aa37a43d0c75ec87f1659f573d3b5867e4a3b3

4 years agoupstream: Check that the addresses supplied to Match Address and
dtucker@openbsd.org [Fri, 28 Aug 2020 03:15:52 +0000 (03:15 +0000)] 
upstream: Check that the addresses supplied to Match Address and

Match LocalAddress are valid when parsing in config-test mode.  This will
catch address/mask mismatches before they cause problems at runtime. Found by
Daniel Stocker, ok djm@

OpenBSD-Commit-ID: 2d0b10c69fad5d8fda4c703e7c6804935289378b

4 years agoupstream: sentence fix; from pedro martelletto
jmc@openbsd.org [Thu, 27 Aug 2020 12:34:00 +0000 (12:34 +0000)] 
upstream: sentence fix; from pedro martelletto

OpenBSD-Commit-ID: f95b84a1e94e9913173229f3787448eea2f8a575

5 years agotweak back-compat for older libfido2
Damien Miller [Thu, 27 Aug 2020 10:01:52 +0000 (20:01 +1000)] 
tweak back-compat for older libfido2

5 years agoupstream: debug()-print a little info about FIDO-specific key
djm@openbsd.org [Thu, 27 Aug 2020 09:46:04 +0000 (09:46 +0000)] 
upstream: debug()-print a little info about FIDO-specific key

fields via "ssh-keygen -vyf /path/key"

OpenBSD-Commit-ID: cf315c4fe77db43947d111b00155165cb6b577cf

5 years agoupstream: skip a bit more FIDO token selection logic when only a
djm@openbsd.org [Thu, 27 Aug 2020 09:43:28 +0000 (09:43 +0000)] 
upstream: skip a bit more FIDO token selection logic when only a

single token is attached.

with Pedro Martelletto

OpenBSD-Commit-ID: e4a324bd9814227ec1faa8cb619580e661cca9ac

5 years agoupstream: tweak previous;
jmc@openbsd.org [Thu, 27 Aug 2020 06:15:22 +0000 (06:15 +0000)] 
upstream: tweak previous;

OpenBSD-Commit-ID: 92714b6531e244e4da401b2defaa376374e24be7

5 years agoupstream: adapt to API changes
djm@openbsd.org [Thu, 27 Aug 2020 03:55:22 +0000 (03:55 +0000)] 
upstream: adapt to API changes

OpenBSD-Regress-ID: 5f147990cb67094fe554333782ab268a572bb2dd

5 years agodegrade semi-gracefully when libfido2 is too old
Damien Miller [Thu, 27 Aug 2020 02:37:12 +0000 (12:37 +1000)] 
degrade semi-gracefully when libfido2 is too old

5 years agoupstream: dummy firmware needs to match API version numner crank (for
djm@openbsd.org [Thu, 27 Aug 2020 01:15:36 +0000 (01:15 +0000)] 
upstream: dummy firmware needs to match API version numner crank (for

verify-required resident keys) even though it doesn't implement this feature

OpenBSD-Regress-ID: 86579ea2891e18e822e204413d011b2ae0e59657

5 years agoupstream: remove unreachable code I forgot to delete in r1.334
djm@openbsd.org [Thu, 27 Aug 2020 02:11:09 +0000 (02:11 +0000)] 
upstream: remove unreachable code I forgot to delete in r1.334

OpenBSD-Commit-ID: 9ed6078251a0959ee8deda443b9ae42484fd8b18

5 years agoupstream: Request PIN ahead of time for certain FIDO actions
djm@openbsd.org [Thu, 27 Aug 2020 01:08:45 +0000 (01:08 +0000)] 
upstream: Request PIN ahead of time for certain FIDO actions

When we know that a particular action will require a PIN, such as
downloading resident keys or generating a verify-required key, request
the PIN before attempting it.

joint work with Pedro Martelletto; ok markus@

OpenBSD-Commit-ID: 863182d38ef075bad1f7d20ca485752a05edb727

5 years agoupstream: preserve verify-required for resident FIDO keys
djm@openbsd.org [Thu, 27 Aug 2020 01:08:19 +0000 (01:08 +0000)] 
upstream: preserve verify-required for resident FIDO keys

When downloading a resident, verify-required key from a FIDO token,
preserve the verify-required in the private key that is written to
disk. Previously we weren't doing that because of lack of support
in the middleware API.

from Pedro Martelletto; ok markus@ and myself

OpenBSD-Commit-ID: 201c46ccdd227cddba3d64e1bdbd082afa956517

5 years agoupstream: major rework of FIDO token selection logic
djm@openbsd.org [Thu, 27 Aug 2020 01:07:51 +0000 (01:07 +0000)] 
upstream: major rework of FIDO token selection logic

When PINs are in use and multiple FIDO tokens are attached to a host, we
cannot just blast requests at all attached tokens with the PIN specified
as this will cause the per-token PIN failure counter to increment. If
this retry counter hits the token's limit (usually 3 attempts), then the
token will lock itself and render all (web and SSH) of its keys invalid.
We don't want this.

So this reworks the key selection logic for the specific case of
multiple keys being attached. When multiple keys are attached and the
operation requires a PIN, then the user must touch the key that they
wish to use first in order to identify it.

This may require multiple touches, but only if there are multiple keys
attached AND (usually) the operation requires a PIN. The usual case of a
single key attached should be unaffected.

Work by Pedro Martelletto; ok myself and markus@

OpenBSD-Commit-ID: 637d3049ced61b7a9ee796914bbc4843d999a864