From 8229db8f0d6a2ec627d81e3df22b04ead808d609 Mon Sep 17 00:00:00 2001 From: eaglegai Date: Mon, 21 Jun 2021 14:19:44 +0800 Subject: [PATCH] fix CVE-2020-25710 --- CVE-2020-25710.patch | 26 ++++++++++++++++++++++++++ openldap.spec | 9 +++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 CVE-2020-25710.patch diff --git a/CVE-2020-25710.patch b/CVE-2020-25710.patch new file mode 100644 index 0000000..3edfe42 --- /dev/null +++ b/CVE-2020-25710.patch @@ -0,0 +1,26 @@ +From bdb0d459187522a6063df13871b82ba8dcc6efe2 Mon Sep 17 00:00:00 2001 +From: Howard Chu +Date: Mon, 2 Nov 2020 16:01:14 +0000 +Subject: [PATCH] ITS#9384 remove assert in obsolete csnNormalize23() + +--- + servers/slapd/schema_init.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c +index 5812bc4b66..ea0d67aa62 100644 +--- a/servers/slapd/schema_init.c ++++ b/servers/slapd/schema_init.c +@@ -5327,8 +5327,8 @@ csnNormalize23( + } + *ptr = '\0'; + +- assert( ptr == &bv.bv_val[bv.bv_len] ); +- if ( csnValidate( syntax, &bv ) != LDAP_SUCCESS ) { ++ if ( ptr != &bv.bv_val[bv.bv_len] || ++ csnValidate( syntax, &bv ) != LDAP_SUCCESS ) { + return LDAP_INVALID_SYNTAX; + } + +-- +GitLab diff --git a/openldap.spec b/openldap.spec index 4ef45af..efd4594 100644 --- a/openldap.spec +++ b/openldap.spec @@ -2,7 +2,7 @@ Name: openldap Version: 2.4.50 -Release: 5 +Release: 6 Summary: LDAP support libraries License: OpenLDAP URL: https://www.openldap.org/ @@ -58,7 +58,8 @@ Patch37: CVE-2020-36228.patch Patch38: CVE-2020-36230.patch Patch39: CVE-2020-36229.patch Patch40: CVE-2021-27212.patch -Patch41: CVE-2020-25709.patch +Patch41: CVE-2020-25709.patch +Patch42: CVE-2020-25710.patch BuildRequires: cyrus-sasl-devel openssl-devel krb5-devel unixODBC-devel chrpath BuildRequires: glibc-devel libtool libtool-ltdl-devel groff perl-interpreter perl-devel perl-generators perl-ExtUtils-Embed @@ -165,6 +166,7 @@ AUTOMAKE=%{_bindir}/true autoreconf -fi %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 ln -s ../../../contrib/slapd-modules/smbk5pwd/smbk5pwd.c servers/slapd/overlays mv contrib/slapd-modules/smbk5pwd/README contrib/slapd-modules/smbk5pwd/README.smbk5pwd @@ -450,6 +452,9 @@ popd %doc ltb-project-openldap-ppolicy-check-password-1.1/README.check_pwd %changelog +* Mon Jun 21 2021 gaihuiying - 2.4.50-6 +- fix CVE-2020-25710 + * Thu May 27 2021 gaihuiying - 2.4.50-5 - fix CVE-2020-25709 -- Gitee