From f3fdc6d7435a8aa1e44ac59583fa7974ab335575 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 31 2021 07:48:16 +0000 Subject: import openldap-2.4.44-24.el7_9 --- diff --git a/SOURCES/openldap-cldap-check-for-error-on-connected-socket.patch b/SOURCES/openldap-cldap-check-for-error-on-connected-socket.patch new file mode 100644 index 0000000..bade69a --- /dev/null +++ b/SOURCES/openldap-cldap-check-for-error-on-connected-socket.patch @@ -0,0 +1,41 @@ +From ec5eba5393e5cc65b05e54658c55500cdbff775a Mon Sep 17 00:00:00 2001 +From: Howard Chu +Date: Wed, 26 Aug 2020 13:22:52 +0100 +Subject: [PATCH 01/34] ITS#9328 cldap: check for error on connected socket + +libldap doesn't use a connected socket for UDP sessions, but 3rd +parties can, passed in with ldap_init_fd(). +--- + libraries/libldap/result.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c +index bdced135b..e2b220630 100644 +--- a/libraries/libldap/result.c ++++ b/libraries/libldap/result.c +@@ -486,7 +486,8 @@ retry: + #ifdef LDAP_CONNECTIONLESS + if ( LDAP_IS_UDP(ld) ) { + struct sockaddr_storage from; +- ber_int_sb_read( lc->lconn_sb, &from, sizeof(struct sockaddr_storage) ); ++ if ( ber_int_sb_read( lc->lconn_sb, &from, sizeof(struct sockaddr_storage) ) < 0 ) ++ goto fail; + if ( ld->ld_options.ldo_version == LDAP_VERSION2 ) isv2 = 1; + } + nextresp3: +@@ -502,10 +503,11 @@ nextresp3: + break; + + case LBER_DEFAULT: ++fail: + err = sock_errno(); + #ifdef LDAP_DEBUG + Debug( LDAP_DEBUG_CONNS, +- "ber_get_next failed.\n", 0, 0, 0 ); ++ "ber_get_next failed, errno=%d.\n", err, 0, 0 ); + #endif + if ( err == EWOULDBLOCK ) return LDAP_MSG_X_KEEP_LOOKING; + if ( err == EAGAIN ) return LDAP_MSG_X_KEEP_LOOKING; +-- +2.26.2 + diff --git a/SPECS/openldap.spec b/SPECS/openldap.spec index 8c3b71c..81dcc70 100644 --- a/SPECS/openldap.spec +++ b/SPECS/openldap.spec @@ -5,7 +5,7 @@ Name: openldap Version: 2.4.44 -Release: 23%{?dist} +Release: 24%{?dist} Summary: LDAP support libraries Group: System Environment/Daemons License: OpenLDAP @@ -38,6 +38,7 @@ Patch7: openldap-allop-overlay.patch Patch8: openldap-syncrepl-unset-tls-options.patch Patch9: openldap-man-sasl-nocanon.patch Patch10: openldap-ai-addrconfig.patch +Patch18: openldap-cldap-check-for-error-on-connected-socket.patch # fix back_perl problems with lt_dlopen() # might cause crashes because of symbol collisions # the proper fix is to link all perl modules against libperl @@ -176,6 +177,7 @@ AUTOMAKE=%{_bindir}/true autoreconf -fi %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch18 -p1 %patch19 -p1 %patch20 -p1 %patch21 -p1 @@ -679,6 +681,9 @@ exit 0 %{_mandir}/man3/* %changelog +* Wed Aug 4 2021 Simon Pichugin - 2.4.44-24 +- CLDAP ldap_result hangs if nobody listens on the port (#1989919) + * Mon Jan 4 2021 Simon Pichugin - 2.4.44-23 - Fix CVE-2020-25692 openldap: NULL pointer dereference for unauthenticated packet in slapd (#1895328)