!265 [sync] PR-259: 修复KEX交换处理中内存泄露

From: @openeuler-sync-bot 
Reviewed-by: @robertxw 
Signed-off-by: @robertxw
This commit is contained in:
openeuler-ci-bot 2024-02-17 08:53:02 +00:00 committed by Gitee
commit f4a99783cf
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From c1345cb819e50e55ae1d3245e148da90260255ca Mon Sep 17 00:00:00 2001
From: songjuntao <songjuntao@kylinos.cn>
Date: Fri, 2 Feb 2024 16:05:29 +0800
Subject: [PATCH] fix memory leak in kex exchange function
Signed-off-by: songjuntao <songjuntao@kylinos.cn>
---
sshconnect2.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sshconnect2.c b/sshconnect2.c
index b82a118..ae018ff 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -354,6 +354,7 @@ ssh_kex2(struct ssh *ssh, char *host, struct sockaddr *hostaddr, u_short port)
(r = ssh_packet_write_wait(ssh)) != 0)
fatal("%s: %s", __func__, ssh_err(r));
#endif
+ free(s);
}
/*
--
2.33.0

View File

@ -6,7 +6,7 @@
%{?no_gtk2:%global gtk2 0}
%global sshd_uid 74
%global openssh_release 29
%global openssh_release 30
Name: openssh
Version: 8.2p1
@ -105,6 +105,7 @@ Patch71: backport-fix-CVE-2023-38408-upstream-terminate-process.patch
Patch72: set-ssh-config.patch
Patch73: backport-CVE-2023-51385-upstream-ban-user-hostnames-with-most-shell-metachar.patch
Patch74: backport-CVE-2023-48795.patch
Patch75: fix-memory-leak-in-kex-exchange.patch
Requires: /sbin/nologin
Requires: libselinux >= 2.3-5 audit-libs >= 1.0.8
@ -282,6 +283,7 @@ popd
%patch72 -p1
%patch73 -p1
%patch74 -p1
%patch75 -p1
autoreconf
pushd pam_ssh_agent_auth-0.10.3
@ -491,6 +493,12 @@ getent passwd sshd >/dev/null || \
%attr(0644,root,root) %{_mandir}/man8/sftp-server.8*
%changelog
* Fri Feb 2 2024 songjuntao<songjuntao@kylinos.cn> - 8.2p1-30
- Type:bugfix
- CVE:
- SUG:NA
- DESC: fix memory leak in kex2 exchange function
* Tue Jan 9 2024 renmingshuai<renmingshuai@huawei.cn> - 8.2p1-29
- Type:CVE
- CVE:CVE-2023-48795