Commit Graph

10657 Commits

Author SHA1 Message Date
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
cheloha@openbsd.org
1196d7f49d upstream: ssh-keyscan(1): simplify conloop() with timercmp(3),
timersub(3); ok djm@

OpenBSD-Commit-ID: a102acb544f840d33ad73d40088adab4a687fa27
2020-08-27 11:27:01 +10:00
djm@openbsd.org
d0a195c89e upstream: let ssh_config(5)'s AddKeysToAgent keyword accept a time
limit for keys in addition to its current flag options. Time-limited keys
will automatically be removed from ssh-agent after their expiry time has
passed; ok markus@

OpenBSD-Commit-ID: 792e71cacbbc25faab5424cf80bee4a006119f94
2020-08-27 11:27:01 +10:00
djm@openbsd.org
e9c2002891 upstream: let the "Confirm user presence for key ..." ssh-askpass
notification respect $SSH_ASKPASS_REQUIRE; ok markus@

OpenBSD-Commit-ID: 7c1a616b348779bda3b9ad46bf592741f8e206c1
2020-08-27 11:26:26 +10:00
Darren Tucker
eaf8672b1b Remove check for 'ent' command.
It was added in 8d1fd57a9 for measuring entropy of ssh_prng_cmds which
has long since been removed and there are no other references to it.
2020-08-21 00:07:48 +10:00
Darren Tucker
05c215de8d Wrap stdint.h include in ifdef HAVE_STDINT_H. 2020-08-17 21:34:32 +10:00
Damien Miller
eaf2765efe sync memmem.c with OpenBSD 2020-08-10 13:24:20 +10:00
Darren Tucker
ed6bef77f5 Always send any PAM account messages.
If the PAM account stack reaturns any messages, send them to the user
not just if the check succeeds.  bz#2049, ok djm@
2020-08-07 17:14:56 +10:00
Darren Tucker
a09e98dcae Output test debug logs on failure. 2020-08-07 15:37:37 +10:00
Darren Tucker
eb122b1eeb Add ability to specify exact test target. 2020-08-07 15:24:55 +10:00
Darren Tucker
c2ec7a07f8 Document --without-openssl and --without-zlib. 2020-08-07 14:26:20 +10:00
Darren Tucker
651bb3a319 Add without-openssl without-zlib test target. 2020-08-07 14:26:20 +10:00
Stefan Schindler
9499f2bb01 Add CI with prepare script
* Only use heimdal kerberos implementation
* Fetch yubico/libfido2 (see: https://github.com/Yubico/libfido2)
* Add one target for
    * all features
    * each feature alone
    * no features
2020-08-06 00:01:41 +02:00
Damien Miller
ea1f649046 support NetBSD's utmpx.ut_ss address field
bz#960, ok dtucker
2020-08-05 08:58:57 +10:00
Damien Miller
32c63e75a7 wrap a declaration in the same ifdefs as its use
avoids warnings on NetBSD
2020-08-04 14:59:21 +10:00
Damien Miller
c9e3be9f4b undef TAILQ_CONCAT and friends
Needed for NetBSD. etc that supply these macros
2020-08-04 14:58:46 +10:00
djm@openbsd.org
2d8a3b7e8b upstream: ensure that certificate extensions are lexically sorted.
Previously if the user specified a custom extension then the everything would
be in order except the custom ones. bz3198 ok dtucker markus

OpenBSD-Commit-ID: d97deb90587b06cb227c66ffebb2d9667bf886f0
2020-08-03 14:27:59 +10:00
djm@openbsd.org
a8732d74cb upstream: allow -A to explicitly enable agent forwarding in scp and
sftp. The default remains to not forward an agent, even when ssh_config
enables it. ok jmc dtucker markus

OpenBSD-Commit-ID: 36cc526aa3b0f94e4704b8d7b969dd63e8576822
2020-08-03 14:27:59 +10:00
deraadt@openbsd.org
ab9105470a upstream: clang -Wimplicit-fallthrough does not recognise /*
FALLTHROUGH */ comments, which is the style we currently use, and gives too
many boring warnings. ok djm

OpenBSD-Commit-ID: 07b5031e9f49f2b69ac5e85b8da4fc9e393992a0
2020-08-03 14:27:50 +10:00
dtucker@openbsd.org
ced327b9fb upstream: Also compare username when checking for JumpHost loops.
bz#3057, ok djm@

OpenBSD-Commit-ID: 9bbc1d138adb34c54f3c03a15a91f75dbf418782
2020-08-03 14:27:18 +10:00
Darren Tucker
ae7527010c Remove AC_REVISION.
It hasn't been useful since we switched to git in 2014.  ok djm@
2020-07-31 15:19:56 +10:00
Darren Tucker
89fc3f414b Use argv in OSSH_CHECK_CFLAG_COMPILE test.
configure.ac is not detecting -Wextra in compilers that implement the
option. The problem is that -Wextra implies -Wunused-parameter, and the
C excerpt used by aclocal.m4 does not use argv.  Patch from pedro at
ambientworks.net, ok djm@
2020-07-28 19:40:30 +10:00
Darren Tucker
62c81ef531 Skip ECDSA-SK webauthn test when built w/out ECC 2020-07-20 22:12:07 +10:00
Damien Miller
3ec9a6d731 Add ssh-sk-helper and manpage to RPM spec file
Based on patch from Fabio Pedretti
2020-07-20 13:09:25 +10:00
dtucker@openbsd.org
a2855c048b upstream: Add %k to the TOKENs for Match Exec for consistency with
the other keywords that recently got %k.

OpenBSD-Commit-ID: 1857d1c40f270cbc254fca91e66110641dddcfdb
2020-07-17 18:03:28 +10:00
jmc@openbsd.org
69860769fa upstream: fix macro slip in previous;
OpenBSD-Commit-ID: 624e47ab209450ad9ad5c69f54fa69244de5ed9a
2020-07-17 18:03:28 +10:00
dtucker@openbsd.org
40649bd082 upstream: Add test for '%k' (HostKeyAlias) TOKEN.
OpenBSD-Regress-ID: 8ed1ba1a811790031aad3fcea860a34ad7910456
2020-07-17 18:03:12 +10:00
dtucker@openbsd.org
6736fe6807 upstream: Add tests for expansions on UserKnownHostsFile.
OpenBSD-Regress-ID: bccf8060306c841bbcceb1392644f906a4d6ca51
2020-07-17 13:53:04 +10:00
djm@openbsd.org
287dc6396e upstream: log error message for process_write() write failures
OpenBSD-Commit-ID: f733d7b3b05e3c68967dc18dfe39b9e8fad29851
2020-07-17 13:52:46 +10:00
dtucker@openbsd.org
8df5774a42 upstream: Add a '%k' TOKEN that expands to the effective HostKey of
the destination.  This allows, eg, keeping host keys in individual files
using "UserKnownHostsFile ~/.ssh/known_hosts.d/%k". bz#1654, ok djm@, jmc@
(man page bits)

OpenBSD-Commit-ID: 7084d723c9cc987a5c47194219efd099af5beadc
2020-07-17 13:52:46 +10:00