diff options
author | djm@openbsd.org <djm@openbsd.org> | 2024-07-26 00:40:08 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2024-07-26 00:51:40 +0200 |
commit | 29fb6f6d46b67770084b4f12bcf8a01bd535041b (patch) | |
tree | 0a46a2b18f8386e3483b5ded512c6e8abd08c28d /channels.h | |
parent | upstream: mention mux proxy mode (diff) | |
download | openssh-29fb6f6d46b67770084b4f12bcf8a01bd535041b.tar.xz openssh-29fb6f6d46b67770084b4f12bcf8a01bd535041b.zip |
upstream: Fix proxy multiplexing (-O proxy) bug
If a mux started with ControlPersist then later has a forwarding added using
mux proxy connection and the forwarding was used, then when the mux proxy
session terminates, the mux master process will send a channel close to the
server with a bad channel ID and crash the connection.
This was caused by my stupidly reusing c->remote_id for mux channel
associations when I should have just added another member to struct channel.
ok markus@
OpenBSD-Commit-ID: c9f474e0124e3fe456c5e43749b97d75e65b82b2
Diffstat (limited to 'channels.h')
-rw-r--r-- | channels.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels.h b/channels.h index fdea9f574..3ac5e837b 100644 --- a/channels.h +++ b/channels.h @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.h,v 1.156 2024/05/23 23:47:16 jsg Exp $ */ +/* $OpenBSD: channels.h,v 1.157 2024/07/25 22:40:08 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -139,6 +139,8 @@ struct Channel { u_int io_ready; /* bitmask of SSH_CHAN_IO_* */ int pfds[4]; /* pollfd entries for rfd/wfd/efd/sock */ int ctl_chan; /* control channel (multiplexed connections) */ + uint32_t ctl_child_id; /* child session for mux controllers */ + int have_ctl_child_id;/* non-zero if ctl_child_id is valid */ int isatty; /* rfd is a tty */ #ifdef _AIX int wfd_isatty; /* wfd is a tty */ |