summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rw-r--r--sshd.c9
2 files changed, 6 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog
index c42a3c50d..db627a97a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ openssh (1:4.7p1-12) UNRELEASED; urgency=low
3 * Fill in CVE identifier for ssh-vulnkey bug fixed in 1:4.7p1-10. 3 * Fill in CVE identifier for ssh-vulnkey bug fixed in 1:4.7p1-10.
4 * Refactor rejection of blacklisted user keys into a single 4 * Refactor rejection of blacklisted user keys into a single
5 reject_blacklisted_key function in auth.c (thanks, Dmitry V. Levin). 5 reject_blacklisted_key function in auth.c (thanks, Dmitry V. Levin).
6 * Fix memory leak of blacklisted host keys (thanks, Dmitry V. Levin).
6 * debconf template translations: 7 * debconf template translations:
7 - Update Dutch (thanks, Bart Cornelis; closes: #483004). 8 - Update Dutch (thanks, Bart Cornelis; closes: #483004).
8 9
diff --git a/sshd.c b/sshd.c
index 80cfd56d8..ac539d6bb 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1496,10 +1496,6 @@ main(int ac, char **av)
1496 1496
1497 for (i = 0; i < options.num_host_key_files; i++) { 1497 for (i = 0; i < options.num_host_key_files; i++) {
1498 key = key_load_private(options.host_key_files[i], "", NULL); 1498 key = key_load_private(options.host_key_files[i], "", NULL);
1499 if (key && reject_blacklisted_key(key, 1) == 1) {
1500 sensitive_data.host_keys[i] = NULL;
1501 continue;
1502 }
1503 sensitive_data.host_keys[i] = key; 1499 sensitive_data.host_keys[i] = key;
1504 if (key == NULL) { 1500 if (key == NULL) {
1505 error("Could not load host key: %s", 1501 error("Could not load host key: %s",
@@ -1507,6 +1503,11 @@ main(int ac, char **av)
1507 sensitive_data.host_keys[i] = NULL; 1503 sensitive_data.host_keys[i] = NULL;
1508 continue; 1504 continue;
1509 } 1505 }
1506 if (reject_blacklisted_key(key, 1) == 1) {
1507 key_free(key);
1508 sensitive_data.host_keys[i] = NULL;
1509 continue;
1510 }
1510 switch (key->type) { 1511 switch (key->type) {
1511 case KEY_RSA1: 1512 case KEY_RSA1:
1512 sensitive_data.ssh1_host_key = key; 1513 sensitive_data.ssh1_host_key = key;