[openssh-commits] [openssh] 08/13: upstream: Don't let a cert mask lookup of a plain key recorded as

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Nov 27 08:18:24 AEDT 2026


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 51d7163fd3b4c48266eae648c374aa6ab2320822
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Thu Nov 26 20:01:05 2026 +0000

    upstream: Don't let a cert mask lookup of a plain key recorded as
    
    Anthropic ANT-2026-YXGJHHI6
    
    OpenBSD-Commit-ID: 6c7b0540252b2e1dbfec4bc8de72f573cbd65339
---
 sshconnect.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sshconnect.c b/sshconnect.c
index aafcf8662..f665c6193 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect.c,v 1.394 2026/11/26 19:18:53 djm Exp $ */
+/* $OpenBSD: sshconnect.c,v 1.395 2026/11/26 20:01:05 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -1533,10 +1533,12 @@ check_host_key(char *hostname, const struct ssh_conn_info *cinfo,
 	return 0;
 
 fail:
-	if (want_cert && host_status != HOST_REVOKED) {
+	if (want_cert && host_status != HOST_REVOKED && !clobber_port) {
 		/*
 		 * No matching certificate. Downgrade cert to raw key and
 		 * search normally.
+		 * Don't do this in the port-less lookup: the caller will
+		 * downgrade and retry itself.
 		 */
 		debug("No matching CA found. Retry with plain key");
 		if ((r = sshkey_from_private(host_key, &raw_key)) != 0)

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list