Commit Graph

10686 Commits

Author SHA1 Message Date
djm@openbsd.org e5ed753add upstream: want time.h here too
OpenBSD-Commit-ID: fafee8f1108c64ad8b282f9a1ed5ea830d8c58a7
2020-10-03 14:33:58 +10:00
deraadt@openbsd.org 66bd9fdf8b 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
2020-10-03 13:39:22 +10:00
Damien Miller 86cc8ce002 use relative rather than system include here 2020-10-03 13:39:17 +10:00
Damien Miller 922cfac5ed add some openbsd-compat licenses we missed 2020-10-03 13:39:17 +10:00
Philip Hands ce941c75ea un-nest $() to make ksh cheerful 2020-10-03 09:26:00 +10:00
Philip Hands 18ea5f4b88 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.
2020-10-03 09:25:32 +10:00
Oleg d9e727dcc0 Fix `EOF: command not found` error in ssh-copy-id 2020-10-03 09:20:55 +10:00
dtucker@openbsd.org a1a856d50c upstream: Regen moduli.
OpenBSD-Commit-ID: 04967f8c43e9854ac34b917bcd6f5ac96c53a693
2020-09-30 19:35:35 +10:00
HARUYAMA Seigo fa1fe3ead7 Restore first section title of INSTALL 2020-09-27 21:12:12 +10:00
Damien Miller 279261e1ea update version numbers 2020-09-27 17:25:01 +10:00
djm@openbsd.org 58ca6ab6ff upstream: openssh 8.4
OpenBSD-Commit-ID: a29e5b372d2c00e297da8a35a3b87c9beb3b4a58
2020-09-27 17:23:20 +10:00
Damien Miller 9bb8a303ce sync with upstream ssh-copy-id rev f0da1a1b7 2020-09-22 10:07:43 +10:00
djm@openbsd.org 0a4a5571ad upstream: close stdin when forking after authentication too; ok markus
OpenBSD-Commit-ID: 43db17e4abc3e6b4a7b033aa8cdab326a7cb6c24
2020-09-21 17:30:27 +10:00
djm@openbsd.org d14fe25e6c upstream: close stdout/stderr after "ssh -f ..." forking
bz#3137, ok markus

OpenBSD-Commit-ID: e2d83cc4dea1665651a7aa924ad1ed6bcaaab3e2
2020-09-21 09:32:48 +10:00
Damien Miller 53a33a0d74 .depend 2020-09-20 16:16:47 +10:00
djm@openbsd.org 107eb3eeaf 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
2020-09-20 16:16:46 +10:00
Damien Miller acfe2ac5fe libfido2 1.5.0 is recommended 2020-09-18 22:02:53 +10:00
djm@openbsd.org 52a03e9fca upstream: handle multiple messages in a single read()
PR#183 by Dennis Kaarsemaker; feedback and ok markus@

OpenBSD-Commit-ID: 8570bb4d02d00cf70b98590716ea6a7d1cce68d1
2020-09-18 18:17:59 +10:00
pedro martelletto dc098405b2 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().
2020-09-18 08:57:29 +02:00
djm@openbsd.org b3855ff053 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
2020-09-18 15:25:01 +10:00
Damien Miller f93b187ab9 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.
2020-09-18 14:55:48 +10:00
Damien Miller 9d3d36bdb1 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>.
2020-09-18 14:50:38 +10:00
dtucker@openbsd.org d6f507f37e upstream: Remove unused buf, last user was removed when switching
to the sshbuf API. Patch from Sebastian Andrzej Siewior.

OpenBSD-Commit-ID: 250fa17f0cec01039cc4abd95917d9746e24c889
2020-09-16 14:21:53 +10:00
djm@openbsd.org c3c786c3a0 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
2020-09-16 14:21:53 +10:00
Darren Tucker f2950baf0b New config-build-time dependency on automake. 2020-09-11 14:45:23 +10:00
Darren Tucker 600c1c27ab Add aclocal.m4 and config.h.in~ to .gitignore.
aclocal.m4 is now generated by autoreconf.
2020-09-11 13:18:42 +10:00
Sebastian Andrzej Siewior 4bf7e1d00b 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>
2020-09-11 13:18:42 +10:00
Sebastian Andrzej Siewior a2f3ae386b 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>
2020-09-11 13:18:42 +10:00
Sebastian Andrzej Siewior 8372bff3a8 Remove HAVE_MMAP and BROKEN_MMAP
BROKEN_MMAP is no longer defined since commit
   1cfd5c06ef ("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>
2020-09-11 13:18:42 +10:00
djm@openbsd.org bbf20ac806 upstream: adapt to SSH_SK_VERSION_MAJOR crank
OpenBSD-Regress-ID: 0f3e76bdc8f9dbd9d22707c7bdd86051d5112ab8
2020-09-09 13:12:29 +10:00
dtucker@openbsd.org 9afe2a1508 upstream: Ensure that address/mask mismatches are flagged at
config-check time. ok djm@

OpenBSD-Regress-ID: 8f5f4c2c0bf00e6ceae7a1755a444666de0ea5c2
2020-09-09 13:12:29 +10:00
djm@openbsd.org c767735241 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
2020-09-09 13:11:34 +10:00
pedro martelletto c1c44eeecd 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.
2020-09-02 12:27:27 +10:00
djm@openbsd.org 785f0f315b upstream: refuse to add verify-required (PINful) FIDO keys to
ssh-agent until the agent supports them properly

OpenBSD-Commit-ID: 125bd55a8df32c87c3ec33c6ebe437673a3d037e
2020-08-31 14:34:41 +10:00
djm@openbsd.org 39e88aeff9 upstream: Add RCS IDs to the few files that are missing them; from
Pedro Martelletto

OpenBSD-Commit-ID: 39aa37a43d0c75ec87f1659f573d3b5867e4a3b3
2020-08-31 14:34:41 +10:00
dtucker@openbsd.org 72730249b3 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
2020-08-31 14:34:34 +10:00
jmc@openbsd.org 2a3a982231 upstream: sentence fix; from pedro martelletto
OpenBSD-Commit-ID: f95b84a1e94e9913173229f3787448eea2f8a575
2020-08-31 14:34:34 +10:00
Damien Miller ce178be0d9 tweak back-compat for older libfido2 2020-08-27 20:01:52 +10:00
djm@openbsd.org d6f45cdde0 upstream: debug()-print a little info about FIDO-specific key
fields via "ssh-keygen -vyf /path/key"

OpenBSD-Commit-ID: cf315c4fe77db43947d111b00155165cb6b577cf
2020-08-27 19:47:35 +10:00
djm@openbsd.org b969072cc3 upstream: skip a bit more FIDO token selection logic when only a
single token is attached.

with Pedro Martelletto

OpenBSD-Commit-ID: e4a324bd9814227ec1faa8cb619580e661cca9ac
2020-08-27 19:47:35 +10:00
jmc@openbsd.org 744df42a12 upstream: tweak previous;
OpenBSD-Commit-ID: 92714b6531e244e4da401b2defaa376374e24be7
2020-08-27 19:47:35 +10:00
djm@openbsd.org e32479645c upstream: adapt to API changes
OpenBSD-Regress-ID: 5f147990cb67094fe554333782ab268a572bb2dd
2020-08-27 13:58:23 +10:00
Damien Miller bbcc858ded degrade semi-gracefully when libfido2 is too old 2020-08-27 12:37:12 +10:00
djm@openbsd.org 9cbbdc12cb 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
2020-08-27 12:16:23 +10:00
djm@openbsd.org c1e76c6495 upstream: remove unreachable code I forgot to delete in r1.334
OpenBSD-Commit-ID: 9ed6078251a0959ee8deda443b9ae42484fd8b18
2020-08-27 12:12:17 +10:00
djm@openbsd.org 0caff05350 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
2020-08-27 11:28:36 +10:00
djm@openbsd.org b649b3daa6 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
2020-08-27 11:28:36 +10:00
djm@openbsd.org 642e06d0df 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
2020-08-27 11:28:36 +10:00
djm@openbsd.org 801c9f095e upstream: support for requiring user verified FIDO keys in sshd
This adds a "verify-required" authorized_keys flag and a corresponding
sshd_config option that tells sshd to require that FIDO keys verify the
user identity before completing the signing/authentication attempt.
Whether or not user verification was performed is already baked into the
signature made on the FIDO token, so this is just plumbing that flag
through and adding ways to require it.

feedback and ok markus@

OpenBSD-Commit-ID: 3a2313aae153e043d57763d766bb6d55c4e276e6
2020-08-27 11:28:36 +10:00
djm@openbsd.org 9b8ad93824 upstream: support for user-verified FIDO keys
FIDO2 supports a notion of "user verification" where the user is
required to demonstrate their identity to the token before particular
operations (e.g. signing). Typically this is done by authenticating
themselves using a PIN that has been set on the token.

This adds support for generating and using user verified keys where
the verification happens via PIN (other options might be added in the
future, but none are in common use now). Practically, this adds
another key generation option "verify-required" that yields a key that
requires a PIN before each authentication.

feedback markus@ and Pedro Martelletto; ok markus@

OpenBSD-Commit-ID: 57fd461e4366f87c47502c5614ec08573e6d6a15
2020-08-27 11:28:36 +10:00