Remote port forwarding in a multiplexed connection: possible "clientspecified" bug

Sami.Hartikainen at teleste.com Sami.Hartikainen at teleste.com
Fri Sep 19 18:49:42 EST 2014


...and the fix could be something like the patch below:

---
 mux.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mux.c b/mux.c
index 48f7a05..f6ac30c 100644
--- a/mux.c
+++ b/mux.c
@@ -1689,7 +1689,8 @@ mux_client_forward(int fd, int cancel_flag, u_int ftype, struct Forward *fwd)
 		buffer_put_cstring(&m, fwd->listen_path);
 	} else {
 		buffer_put_cstring(&m,
-		    fwd->listen_host == NULL ? "" : fwd->listen_host);
+		    fwd->listen_host == NULL ? "" :
+		    *fwd->listen_host == '\0' ? "*" : fwd->listen_host);
 	}
 	buffer_put_int(&m, fwd->listen_port);
 	if (fwd->connect_path != NULL) {
-- 
1.9.1



More information about the openssh-unix-dev mailing list