[openssh-commits] [openssh] 01/04: upstream: when replying to a "query" SSH_AGENTC_EXTENSION request,

git+noreply at mindrot.org git+noreply at mindrot.org
Sun Jun 14 14:33:48 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 b7e552138b8861469295e33e1457040e3f747d06
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Sat Jun 13 00:37:13 2026 +0000

    upstream: when replying to a "query" SSH_AGENTC_EXTENSION request,
    
    don't append an SSH_AGENT_SUCCESS to the reply to the query. bz3967 ok
    dtucker@
    
    OpenBSD-Commit-ID: b51418708096e26dbf73a0c1d3cb49b7352bc899
---
 ssh-agent.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/ssh-agent.c b/ssh-agent.c
index 151b2b324..a8bbf8d73 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-agent.c,v 1.328 2026/05/31 04:31:04 djm Exp $ */
+/* $OpenBSD: ssh-agent.c,v 1.329 2026/06/13 00:37:13 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -1792,7 +1792,7 @@ process_ext_query(SocketEntry *e)
 static void
 process_extension(SocketEntry *e)
 {
-	int r, success = 0;
+	int r, replied = 0, success = 0;
 	char *name;
 
 	debug2_f("entering");
@@ -1803,7 +1803,7 @@ process_extension(SocketEntry *e)
 	}
 
 	if (strcmp(name, "query") == 0)
-		success = process_ext_query(e);
+		replied = success = process_ext_query(e);
 	else if (strcmp(name, "session-bind at openssh.com") == 0)
 		success = process_ext_session_bind(e);
 	else {
@@ -1814,8 +1814,10 @@ process_extension(SocketEntry *e)
 	}
 	free(name);
 	/* Agent failures are signalled with a different error code */
-	send_status_generic(e,
-	    success ? SSH_AGENT_SUCCESS : SSH_AGENT_EXTENSION_FAILURE);
+	if (!replied) {
+		send_status_generic(e,
+		    success ? SSH_AGENT_SUCCESS : SSH_AGENT_EXTENSION_FAILURE);
+	}
 }
 
 /*

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


More information about the openssh-commits mailing list