diff --git a/fix-memory-leak-in-kex-exchange.patch b/fix-memory-leak-in-kex-exchange.patch new file mode 100644 index 0000000000000000000000000000000000000000..f7f88f12e97883ffa9d74cae38470ff3831ba1c3 --- /dev/null +++ b/fix-memory-leak-in-kex-exchange.patch @@ -0,0 +1,25 @@ +From c1345cb819e50e55ae1d3245e148da90260255ca Mon Sep 17 00:00:00 2001 +From: songjuntao +Date: Fri, 2 Feb 2024 16:05:29 +0800 +Subject: [PATCH] fix memory leak in kex exchange function + +Signed-off-by: songjuntao +--- + 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 + diff --git a/openssh.spec b/openssh.spec index d62e55c2fa92176369b983f28cada442a41c3728..354b6a57c601682e802f8d2c4525bb0c516fd2da 100644 --- a/openssh.spec +++ b/openssh.spec @@ -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 Jan 26 2024 songjuntao - 8.2p1-30 +- Type:bugfix +- CVE: +- SUG:NA +- DESC: fix memory leak in kex2 exchange function + * Tue Jan 9 2024 renmingshuai - 8.2p1-29 - Type:CVE - CVE:CVE-2023-48795