[openssh-commits] [openssh] branch master updated: upstream: require control-escape character sequences passed via the '-e
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Oct 18 16:04:26 AEDT 2024
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
The following commit(s) were added to refs/heads/master by this push:
new d01ee7a8 upstream: require control-escape character sequences passed via the '-e
d01ee7a8 is described below
commit d01ee7a88c5f4b1aa8c75a7c739f8f3bc1ad8bde
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Fri Oct 18 05:03:34 2024 +0000
upstream: require control-escape character sequences passed via the '-e
^x' commandline to be exactly two characters long. Avoids one by OOB read if
ssh is invoked as "ssh -e^ ..."
Spotted by Maciej Domanski in GHPR368
OpenBSD-Commit-ID: baa72bc60898fc5639e6c62de7493a202c95823d
---
ssh.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ssh.c b/ssh.c
index 0019281f..112845be 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.600 2024/01/11 01:45:36 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.601 2024/10/18 05:03:34 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -965,7 +965,7 @@ main(int ac, char **av)
options.log_level = SYSLOG_LEVEL_QUIET;
break;
case 'e':
- if (optarg[0] == '^' && optarg[2] == 0 &&
+ if (strlen(optarg) == 2 && optarg[0] == '^' &&
(u_char) optarg[1] >= 64 &&
(u_char) optarg[1] < 128)
options.escape_char = (u_char) optarg[1] & 31;
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list