diff --git a/backport-Detect-presence-of-dns_zone_setmaxrrperset.patch b/backport-Detect-presence-of-dns_zone_setmaxrrperset.patch new file mode 100644 index 0000000000000000000000000000000000000000..2d822599431b63b21d74f56ac30a12c6d647961c --- /dev/null +++ b/backport-Detect-presence-of-dns_zone_setmaxrrperset.patch @@ -0,0 +1,81 @@ +From 33a671ebd0c4019c6ebb7e46a8329dbcdb4cc18d Mon Sep 17 00:00:00 2001 +From: Petr Menšík +Date: Aug 07 2024 14:19:46 +0000 +Subject: Detect presence of dns_zone_setmaxrrperset + + +Because it were backported into bind-9.16 branch by upstream and testing +of simpler variant fails in some cases. This assumes these call do not +appear only after 9.18.28, but may be backported into previous versions. +Tests just call presence and assumes dns_db_setmaxtypepername will be +present also. + +Conflict: context adapt +Reference: https://pagure.io/bind-dyndb-ldap/c/33a671ebd0c4019c6ebb7e46a8329dbcdb4cc18d +--- + configure.ac | 4 ++++ + src/ldap_driver.c | 25 +++++++++++++++++++++++++ + 2 files changed, 29 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 9f7f364..ea59639 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -169,6 +169,10 @@ AC_CHECK_LIB([dns], [dns_result_totext], + [AC_DEFINE([HAVE_DNS_RESULT_TOTEXT], 1, [Define if dns library provides dns_result_totext])] + ) + ++AC_CHECK_LIB([dns], [dns_db_setmaxrrperset], ++ [AC_DEFINE([HAVE_DNS_DB_SETMAXRRPERSET], 1, [Define if dns library provides dns_db_setmaxrrperset])] ++) ++ + dnl Older autoconf (2.59, for example) doesn't define docdir + [[ ! -n "$docdir" ]] && docdir='${datadir}/doc/${PACKAGE_TARNAME}' + AC_SUBST([docdir]) +diff --git a/src/ldap_driver.c b/src/ldap_driver.c +index e4aeeb2..8d9edf7 100644 +--- a/src/ldap_driver.c ++++ b/src/ldap_driver.c +@@ -926,6 +926,27 @@ setmaxtypepername(dns_db_t *db, uint32_t value) { + } + #endif + ++#if HAVE_DNS_DB_SETMAXRRPERSET ++/* Calls added to fix CVE-2024-1737 in 9.18.28 */ ++static void ++setmaxrrperset(dns_db_t *db, uint32_t value) { ++ ldapdb_t *ldapdb = (ldapdb_t *) db; ++ ++ REQUIRE(VALID_LDAPDB(ldapdb)); ++ ++ return dns_db_setmaxrrperset(ldapdb->rbtdb, value); ++} ++ ++static void ++setmaxtypepername(dns_db_t *db, uint32_t value) { ++ ldapdb_t *ldapdb = (ldapdb_t *) db; ++ ++ REQUIRE(VALID_LDAPDB(ldapdb)); ++ ++ return dns_db_setmaxtypepername(ldapdb->rbtdb, value); ++} ++#endif ++ + static dns_dbmethods_t ldapdb_methods = { + attach, + detach, +@@ -997,9 +1018,9 @@ static dns_dbmethods_t ldapdb_methods = { + #if LIBDNS_VERSION_MAJOR >= 1606 && LIBDNS_VERSION_MAJOR < 1720 + adjusthashsize, /* adjusthashsize */ + #endif +-#if LIBDNS_VERSION_MAJOR >= 1821 +- NULL, /* setmaxrrperset */ +- NULL, /* setmaxtypepername */ ++#if HAVE_DNS_DB_SETMAXRRPERSET ++ setmaxrrperset, /* setmaxrrperset */ ++ setmaxtypepername, /* setmaxtypepername */ + #endif + }; + +-- +2.33.0 diff --git a/bind-dyndb-ldap.spec b/bind-dyndb-ldap.spec index d9a08584a800f4a82bc88c3b5e4bc5ccb0795a45..6bb4c9e9c34b3145f3227c75a1022adf390bc6d1 100644 --- a/bind-dyndb-ldap.spec +++ b/bind-dyndb-ldap.spec @@ -5,7 +5,7 @@ Name: bind-dyndb-ldap Version: 11.10 -Release: 4 +Release: 5 Summary: LDAP back-end plug-in for BIND License: GPLv2+ URL: https://releases.pagure.org/bind-dyndb-ldap @@ -21,6 +21,7 @@ Patch6: backport-bind-dyndb-ldap-11.10-bind-9.18.19.patch Patch7: backport-bind-dyndb-ldap-11.10-dns_name_init.patch Patch8: backport-bind-dyndb-ldap-bind-9.18.24.patch Patch9: backport-bind-dyndb-ldap-11.10-support-for-bind-9.18.21.3.patch +Patch10: backport-Detect-presence-of-dns_zone_setmaxrrperset.patch BuildRequires: bind-devel >= %{bind_version} BuildRequires: krb5-devel @@ -102,6 +103,12 @@ sed -i.bak -e "$SEDSCRIPT" /etc/named.conf %changelog +* Tue May 20 2025 xinghe - 11.10-5 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix build failure for bind CVE-2024-1737 + * Wed Aug 07 2024 Zhao Mengmeng - 11.10-4 - Type:bugfix - CVE:NA