diff options
author | Colin Watson <cjwatson@ubuntu.com> | 2014-02-09 16:09:50 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2014-02-09 16:17:31 +0000 |
commit | 8909ff0e3cd07d1b042d1be1c8b8828dbf6c9a83 (patch) | |
tree | ebee4092f1411059e34da6f66b4ebd64f4411020 /sshconnect2.c | |
parent | 07f2a771c490bd68cd5c5ea9c535705e93bd94f3 (diff) |
Reject vulnerable keys to mitigate Debian OpenSSL flaw
In 2008, Debian (and derived distributions such as Ubuntu) shipped an
OpenSSL package with a flawed random number generator, causing OpenSSH to
generate only a very limited set of keys which were subject to private half
precomputation. To mitigate this, this patch checks key authentications
against a blacklist of known-vulnerable keys, and adds a new ssh-vulnkey
program which can be used to explicitly check keys against that blacklist.
See CVE-2008-0166.
Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1469
Last-Update: 2013-09-14
Patch-Name: ssh-vulnkey.patch
Diffstat (limited to 'sshconnect2.c')
-rw-r--r-- | sshconnect2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sshconnect2.c b/sshconnect2.c index 0b13530ce..93818c991 100644 --- a/sshconnect2.c +++ b/sshconnect2.c | |||
@@ -1491,6 +1491,8 @@ pubkey_prepare(Authctxt *authctxt) | |||
1491 | 1491 | ||
1492 | /* list of keys stored in the filesystem and PKCS#11 */ | 1492 | /* list of keys stored in the filesystem and PKCS#11 */ |
1493 | for (i = 0; i < options.num_identity_files; i++) { | 1493 | for (i = 0; i < options.num_identity_files; i++) { |
1494 | if (options.identity_files[i] == NULL) | ||
1495 | continue; | ||
1494 | key = options.identity_keys[i]; | 1496 | key = options.identity_keys[i]; |
1495 | if (key && key->type == KEY_RSA1) | 1497 | if (key && key->type == KEY_RSA1) |
1496 | continue; | 1498 | continue; |
@@ -1608,7 +1610,7 @@ userauth_pubkey(Authctxt *authctxt) | |||
1608 | debug("Offering %s public key: %s", key_type(id->key), | 1610 | debug("Offering %s public key: %s", key_type(id->key), |
1609 | id->filename); | 1611 | id->filename); |
1610 | sent = send_pubkey_test(authctxt, id); | 1612 | sent = send_pubkey_test(authctxt, id); |
1611 | } else if (id->key == NULL) { | 1613 | } else if (id->key == NULL && id->filename) { |
1612 | debug("Trying private key: %s", id->filename); | 1614 | debug("Trying private key: %s", id->filename); |
1613 | id->key = load_identity_file(id->filename, | 1615 | id->key = load_identity_file(id->filename, |
1614 | id->userprovided); | 1616 | id->userprovided); |