Fix CVE-2020-14387

This commit is contained in:
yang_zhuang_zhuang 2021-06-18 15:03:14 +08:00
parent 684c0da9e8
commit f6117e2183
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,23 @@
From c3f7414c450faaf6a8281cc4a4403529aeb7d859 Mon Sep 17 00:00:00 2001
From: Matt McCutchen <matt@mattmccutchen.net>
Date: Wed, 26 Aug 2020 12:16:08 -0400
Subject: [PATCH] rsync-ssl: Verify the hostname in the certificate when using
openssl.
---
rsync-ssl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rsync-ssl b/rsync-ssl
index 8101975a..46701af1 100755
--- a/rsync-ssl
+++ b/rsync-ssl
@@ -129,7 +129,7 @@ function rsync_ssl_helper {
fi
if [[ $RSYNC_SSL_TYPE == openssl ]]; then
- exec $RSYNC_SSL_OPENSSL s_client $caopt $certopt -quiet -verify_quiet -servername $hostname -connect $hostname:$port
+ exec $RSYNC_SSL_OPENSSL s_client $caopt $certopt -quiet -verify_quiet -servername $hostname -verify_hostname $hostname -connect $hostname:$port
elif [[ $RSYNC_SSL_TYPE == gnutls ]]; then
exec $RSYNC_SSL_GNUTLS --logfile=/dev/null $gnutls_cert_opt $gnutls_opts $hostname:$port
else

View File

@ -1,6 +1,6 @@
Name: rsync Name: rsync
Version: 3.2.3 Version: 3.2.3
Release: 1 Release: 2
Summary: Fast incremental file transfer utility Summary: Fast incremental file transfer utility
License: GPLv3+ License: GPLv3+
URL: http://rsync.samba.org/ URL: http://rsync.samba.org/
@ -19,6 +19,7 @@ Obsoletes: rsync-daemon
%{?systemd_requires} %{?systemd_requires}
Patch1: backport-Work-around-glibc-lchmod-issue-a-better-way.patch Patch1: backport-Work-around-glibc-lchmod-issue-a-better-way.patch
Patch2: backport-CVE-2020-14387-rsync-ssl-Verify-the-hostname-in-the-certificate-whe.patch
%description %description
Rsync is an open source utility that provides fast incremental file transfer. Rsync is an open source utility that provides fast incremental file transfer.
@ -79,6 +80,12 @@ install -D -m644 %{SOURCE6} %{buildroot}/%{_unitdir}/rsyncd@.service
%{_mandir}/man5/rsyncd.conf.5* %{_mandir}/man5/rsyncd.conf.5*
%changelog %changelog
* Fri Jun 18 2021 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 3.2.3-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:Fix CVE-2020-14387
* Fri Jan 22 2021 yixiangzhike <zhangxingliang3@huawei.com> - 3.2.3-1 * Fri Jan 22 2021 yixiangzhike <zhangxingliang3@huawei.com> - 3.2.3-1
- Type:requirement - Type:requirement
- ID:NA - ID:NA