[openssh-commits] [openssh] 44/87: upstream: terminate monitor when auth options merge fails; avoids

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Oct 30 20:21:21 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 a76fb3adab72d957cb69c1e574949febb45976a0
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Fri Oct 30 04:40:03 2026 +0000

    upstream: terminate monitor when auth options merge fails; avoids
    
    NULL dereference later
    
    Anthropic ANT-2026-UES5TKX0
    
    OpenBSD-Commit-ID: 5ecc8e3487801e9bca855e2b5bccd64027833774
---
 monitor.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/monitor.c b/monitor.c
index 6b571db6d..f2890d26c 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor.c,v 1.261 2026/10/30 03:44:02 djm Exp $ */
+/* $OpenBSD: monitor.c,v 1.262 2026/10/30 04:40:03 djm Exp $ */
 /*
  * Copyright 2002 Niels Provos <provos at citi.umich.edu>
  * Copyright 2002 Markus Friedl <markus at openbsd.org>
@@ -1630,10 +1630,13 @@ mm_answer_keyverify(struct ssh *ssh, int sock, struct sshbuf *m)
 			ret = SSH_ERR_SIGNATURE_INVALID;
 		}
 	}
+	if (ret == 0 && key_blobtype == MM_USERKEY &&
+	    auth_activate_options(ssh, key_opts) != 0) {
+		debug_f("key options inconsistent with existing");
+		ret = SSH_ERR_INVALID_ARGUMENT;
+	}
 	auth2_record_key(authctxt, ret == 0, key);
 
-	if (key_blobtype == MM_USERKEY && ret == 0)
-		auth_activate_options(ssh, key_opts);
 	monitor_reset_key_state();
 
 	sshbuf_reset(m);

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


More information about the openssh-commits mailing list