[openssh-commits] [openssh] 01/14: upstream: use fmprintf() to escape banner printed as comment in
git+noreply at mindrot.org
git+noreply at mindrot.org
Thu Nov 26 10:20:46 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 3ae36fb673a3c44b36f289b8b1050acd80481e18
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Wed Nov 25 17:08:58 2026 +0000
upstream: use fmprintf() to escape banner printed as comment in
ssh-keyscan.
Avoids untrusted control characters from hostile servers being exposed
directly to one's terminal.
Anthropic ANT-2026-JC84JZBB
OpenBSD-Commit-ID: c64eb6e1cd45dd21a484c5ca6f1c2fe6c18ed64f
---
ssh-keyscan.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index 23a3e2b6e..f40a1444c 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keyscan.c,v 1.174 2026/11/24 23:59:37 djm Exp $ */
+/* $OpenBSD: ssh-keyscan.c,v 1.175 2026/11/25 17:08:58 djm Exp $ */
/*
* Copyright 1995, 1996 by David Mazieres <dm at lcs.mit.edu>.
*
@@ -52,6 +52,7 @@
#include "ssh_api.h"
#include "dns.h"
#include "addr.h"
+#include "utf8.h"
/* Flag indicating whether IPv4 or IPv6. This can be set on the command line.
Default value is AF_UNSPEC means both IPv4 and IPv6. */
@@ -602,7 +603,7 @@ congreet(int s)
}
/* The comment names the host, which -H promises not to reveal */
if (!quiet && !hash_hosts) {
- fprintf(stdout, "%c %s:%d %s\n", print_sshfp ? ';' : '#',
+ fmprintf(stdout, "%c %s:%d %s\n", print_sshfp ? ';' : '#',
c->c_name, ssh_port, chop(buf));
}
keygrab_ssh2(c);
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list