summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-12-21 00:00:28 +0000
committerDamien Miller <djm@mindrot.org>2017-12-21 15:40:19 +1100
commitd45d69f2a937cea215c7f0424e5a4677b6d8c7fe (patch)
tree8808d64b31825f6117237e81f25771ea99ff0c8b /monitor.c
parentc5a6cbdb79752f7e761074abdb487953ea6db671 (diff)
upstream commit
revert stricter key type / signature type checking in userauth path; too much software generates inconsistent messages, so we need a better plan. OpenBSD-Commit-ID: 4a44ddc991c803c4ecc8f1ad40e0ab4d22e1c519
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 5b8f0ef65..b0227eee1 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor.c,v 1.176 2017/12/18 02:25:15 djm Exp $ */ 1/* $OpenBSD: monitor.c,v 1.177 2017/12/21 00:00:28 djm Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -1353,6 +1353,12 @@ mm_answer_keyverify(int sock, struct sshbuf *m)
1353 !monitor_allowed_key(blob, bloblen)) 1353 !monitor_allowed_key(blob, bloblen))
1354 fatal("%s: bad key, not previously allowed", __func__); 1354 fatal("%s: bad key, not previously allowed", __func__);
1355 1355
1356 /* Empty signature algorithm means NULL. */
1357 if (*sigalg == '\0') {
1358 free(sigalg);
1359 sigalg = NULL;
1360 }
1361
1356 /* XXX use sshkey_froms here; need to change key_blob, etc. */ 1362 /* XXX use sshkey_froms here; need to change key_blob, etc. */
1357 if ((r = sshkey_from_blob(blob, bloblen, &key)) != 0) 1363 if ((r = sshkey_from_blob(blob, bloblen, &key)) != 0)
1358 fatal("%s: bad public key blob: %s", __func__, ssh_err(r)); 1364 fatal("%s: bad public key blob: %s", __func__, ssh_err(r));
@@ -1383,6 +1389,7 @@ mm_answer_keyverify(int sock, struct sshbuf *m)
1383 free(blob); 1389 free(blob);
1384 free(signature); 1390 free(signature);
1385 free(data); 1391 free(data);
1392 free(sigalg);
1386 1393
1387 monitor_reset_key_state(); 1394 monitor_reset_key_state();
1388 1395