[openssh-commits] [openssh] 06/08: upstream: fix ECDSA order check for curves with cofactor != 1. All
git+noreply at mindrot.org
git+noreply at mindrot.org
Mon Jun 29 12:21:33 AEST 2026
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit c58b363e4f7c10134b583fc92556229bf6c2c16b
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Mon Jun 29 01:58:29 2026 +0000
upstream: fix ECDSA order check for curves with cofactor != 1. All
supported EC curves have cofactor 1, so this is a nop. From Swival scanner
OpenBSD-Commit-ID: 4ae44cc97714fcb6d19fa56714ede56c1ef521e1
---
sshkey.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sshkey.c b/sshkey.c
index 00572792f..9967ff539 100644
--- a/sshkey.c
+++ b/sshkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.c,v 1.162 2026/06/14 03:59:34 djm Exp $ */
+/* $OpenBSD: sshkey.c,v 1.163 2026/06/29 01:58:29 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Alexander von Gernler. All rights reserved.
@@ -2725,6 +2725,10 @@ sshkey_ec_validate_public(const EC_GROUP *group, const EC_POINT *public)
ret = SSH_ERR_ALLOC_FAIL;
goto out;
}
+ if (EC_GROUP_get_order(group, order, NULL) != 1) {
+ ret = SSH_ERR_LIBCRYPTO_ERROR;
+ goto out;
+ }
if ((nq = EC_POINT_new(group)) == NULL) {
ret = SSH_ERR_ALLOC_FAIL;
goto out;
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list