1 Star 0 Fork 56

zhangxianjun/openssh

forked from src-openEuler/openssh 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-upstream-fix-memory-leak-in-mux-proxy-mode-when-requ.patch 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
bitianyuan 提交于 2024-11-06 16:06 . backport some upstream patches
From c47e1c9c7911f38b2fc2fb01b1f6ae3a3121a838 Mon Sep 17 00:00:00 2001
From: "djm@openbsd.org" <djm@openbsd.org>
Date: Wed, 6 Mar 2024 02:59:59 +0000
Subject: [PATCH] upstream: fix memory leak in mux proxy mode when requesting
forwarding.
found by RASU JSC, reported by Maks Mishin in GHPR#467
OpenBSD-Commit-ID: 97d96a166b1ad4b8d229864a553e3e56d3116860
Reference:https://github.com/openssh/openssh-portable/commit/c47e1c9c7911f38b2fc2fb01b1f6ae3a3121a838
Conflict:NA
---
channels.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/channels.c b/channels.c
index 6862556be..ece8d30d6 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: channels.c,v 1.430 2023/03/10 03:01:51 dtucker Exp $ */
+/* $OpenBSD: channels.c,v 1.437 2024/03/06 02:59:59 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -3245,9 +3245,8 @@ channel_proxy_downstream(struct ssh *ssh, Channel *downstream)
goto out;
}
/* Record that connection to this host/port is permitted. */
- permission_set_add(ssh, FORWARD_USER, FORWARD_LOCAL, "<mux>", -1,
- listen_host, NULL, (int)listen_port, downstream);
- listen_host = NULL;
+ permission_set_add(ssh, FORWARD_USER, FORWARD_LOCAL, "<mux>",
+ -1, listen_host, NULL, (int)listen_port, downstream);
break;
case SSH2_MSG_CHANNEL_CLOSE:
if (have < 4)
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangxianjun87/openssh.git
git@gitee.com:zhangxianjun87/openssh.git
zhangxianjun87
openssh
openssh
master

搜索帮助