[openssh-commits] [openssh] 01/02: upstream: don't strnvis() log messages that are going to be logged

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Nov 18 11:30:01 AEDT 2025


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

djm pushed a commit to branch master
in repository openssh.

commit e4cc5ab0efd85f01c0e1ae46825ffc0c7a8f44ce
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Mon Nov 17 05:24:42 2025 +0000

    upstream: don't strnvis() log messages that are going to be logged
    
    by sshd-auth via its parent sshd-session process, as the parent will also run
    them though strnvis().
    
    Prevents double-escaping of non-printing characters in some log
    messages. bz3896 ok dtucker@
    
    OpenBSD-Commit-ID: d78faad96a98af5269d66ddceee553cf7d396dfe
---
 log.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/log.c b/log.c
index 5969c4a16..679c24356 100644
--- a/log.c
+++ b/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.65 2025/09/02 09:34:48 djm Exp $ */
+/* $OpenBSD: log.c,v 1.66 2025/11/17 05:24:42 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -403,7 +403,8 @@ do_log(LogLevel level, int force, const char *suffix, const char *fmt,
 		/* Avoid recursion */
 		tmp_handler = log_handler;
 		log_handler = NULL;
-		tmp_handler(level, force, fmtbuf, log_handler_ctx);
+		/* Note: this sends the raw (i.e. no strnvis) log message */
+		tmp_handler(level, force, msgbuf, log_handler_ctx);
 		log_handler = tmp_handler;
 	} else if (log_on_stderr) {
 		snprintf(msgbuf, sizeof msgbuf, "%s%s%.*s\r\n",

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


More information about the openssh-commits mailing list