[openssh-commits] [openssh] branch master updated: upstream: check ssh's handling of stale multiplexing sockets From Jens
git+noreply at mindrot.org
git+noreply at mindrot.org
Tue Sep 22 14:28:52 AEST 2026
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 ccc26c76c upstream: check ssh's handling of stale multiplexing sockets From Jens
ccc26c76c is described below
commit ccc26c76cd47ca224ff5e4ef8b96007b65ff0b4e
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Tue Sep 22 03:26:32 2026 +0000
upstream: check ssh's handling of stale multiplexing sockets From Jens
Rosenboom
OpenBSD-Regress-ID: 875302cf1f6546fe316ef7ca6f2cf24be12ad23f
---
regress/multiplex.sh | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/regress/multiplex.sh b/regress/multiplex.sh
index 584bbbe22..fcaad9886 100644
--- a/regress/multiplex.sh
+++ b/regress/multiplex.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: multiplex.sh,v 1.41 2025/12/07 02:59:53 dtucker Exp $
+# $OpenBSD: multiplex.sh,v 1.42 2026/09/22 03:26:32 djm Exp $
# Placed in the Public Domain.
tid="connection multiplexing"
@@ -48,6 +48,24 @@ if [ $? -ne 0 ]; then
fail "environment not found"
fi
+start_auto_mux_master()
+{
+ trace "start master (with ControlMaster=auto), fork to background"
+ ${SSH} -Nn2 -o ControlMaster=auto -S$CTL -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" somehost \
+ -E $TEST_REGRESS_LOGFILE 2>&1 &
+ # NB. $SSH_PID will be killed by test-exec.sh:cleanup on fatal errors.
+ SSH_PID=$!
+ sleep 2
+ wait_for_mux_master_ready
+}
+
+verbose "test $tid: stale control socket"
+trace "correctly handle stale control socket"
+kill -9 ${SSH_PID} 2>/dev/null
+wait ${SSH_PID}
+test -e "$CTL" || fail "control socket did not remain (after killing ssh command)"
+start_auto_mux_master
+
verbose "test $tid: envpass"
trace "env passing over multiplexed connection"
${SSH} -F $OBJ/ssh_config -oSetEnv="_XXX_TEST=foo" -S$CTL otherhost sh << 'EOF'
@@ -195,6 +213,7 @@ ${SSH} -F $OBJ/ssh_config -S $CTL -Oexit otherhost >>$TEST_REGRESS_LOGFILE 2>&1
# Wait for master to exit
wait $SSH_PID
kill -0 $SSH_PID >/dev/null 2>&1 && fail "exit command failed"
+test ! -e "$CTL" || fail "control socket still exists after exit command"
# Enable compression and alternative kex for next conninfo test.
if $SSH -Q compression | grep zlib at openssh.com >/dev/null; then
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list