Bugzilla – Attachment 3178 Details for
Bug 2897
Short RSA key in RevokedKeys prevents everyone from logging in
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
ignore invalid key length errors in sshkey_in_file()
bz2897.diff (text/plain), 1.04 KB, created by
Damien Miller
on 2018-09-21 13:32:31 AEST
(
hide
)
Description:
ignore invalid key length errors in sshkey_in_file()
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2018-09-21 13:32:31 AEST
Size:
1.04 KB
patch
obsolete
>commit 54267f949692833458562787166e1bea29d124fb >Author: Damien Miller <djm@mindrot.org> >Date: Fri Sep 21 13:27:56 2018 +1000 > > bz2897 > >diff --git a/authfile.c b/authfile.c >index 6309e18..d993a43 100644 >--- a/authfile.c >+++ b/authfile.c >@@ -454,6 +454,8 @@ sshkey_in_file(struct sshkey *key, const char *filename, int strict_type, > return SSH_ERR_SYSTEM_ERROR; > > while (getline(&line, &linesize, f) != -1) { >+ sshkey_free(pub); >+ pub = NULL; > cp = line; > > /* Skip leading whitespace. */ >@@ -472,16 +474,20 @@ sshkey_in_file(struct sshkey *key, const char *filename, int strict_type, > r = SSH_ERR_ALLOC_FAIL; > goto out; > } >- if ((r = sshkey_read(pub, &cp)) != 0) >+ switch (r = sshkey_read(pub, &cp)) { >+ case 0: >+ break; >+ case SSH_ERR_KEY_LENGTH: >+ continue; >+ default: > goto out; >+ } > if (sshkey_compare(key, pub) || > (check_ca && sshkey_is_cert(key) && > sshkey_compare(key->cert->signature_key, pub))) { > r = 0; > goto out; > } >- sshkey_free(pub); >- pub = NULL; > } > r = SSH_ERR_KEY_NOT_FOUND; > out:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2897
: 3178