From b8d9881af662b9a6c46725925c08abc193dea0fa Mon Sep 17 00:00:00 2001 From: Choice Date: Wed, 29 Apr 2020 11:14:22 +0800 Subject: [PATCH 1/3] bind-named-hangs-or-cransh --- bind-named-hangs-or-cransh.patch | 112 +++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 bind-named-hangs-or-cransh.patch diff --git a/bind-named-hangs-or-cransh.patch b/bind-named-hangs-or-cransh.patch new file mode 100644 index 0000000..09f0bc3 --- /dev/null +++ b/bind-named-hangs-or-cransh.patch @@ -0,0 +1,112 @@ +diff --git a/configure.in b/configure.in +index afdbe77..df40dba 100644 +--- a/configure.in ++++ b/configure.in +@@ -4217,71 +4217,53 @@ AC_CHECK_FUNCS(nanosleep usleep explicit_bzero) + # + # Machine architecture dependent features + # +-have_stdatomic=no +-AC_MSG_CHECKING(for usable stdatomic.h) +-AC_TRY_COMPILE([ +-#include +-#include +-], +-[ +-atomic_int_fast32_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed); +-], +- [AC_MSG_RESULT(yes) +- have_stdatomic=yes +- ISC_PLATFORM_HAVESTDATOMIC="#define ISC_PLATFORM_HAVESTDATOMIC 1"], +- [AC_MSG_RESULT(no) +- have_stdatomic=no +- ISC_PLATFORM_HAVESTDATOMIC="#undef ISC_PLATFORM_HAVESTDATOMIC"]) +- + AC_ARG_ENABLE(atomic, + AS_HELP_STRING([--enable-atomic], +- [enable machine specific atomic operations [default=autodetect]]), ++ [enable machine specific atomic operations [default=nostd]]), + enable_atomic="$enableval", +- enable_atomic="autodetect") ++ enable_atomic="nostd") + case "$enable_atomic" in +- yes|''|autodetect) +- case "$host" in +- powerpc-ibm-aix*) +- if test "X$GCC" = "Xyes"; then +- AC_MSG_CHECKING([if asm("ics"); works]) +- AC_TRY_COMPILE(,[ +- main() { asm("ics"); exit(0); } +- ], +- [AC_MSG_RESULT(yes) +- use_atomic=yes], +- [ +- saved_cflags="$CFLAGS" +- CFLAGS="$CFLAGS -Wa,-many" +- AC_TRY_RUN([ +- main() { asm("ics"); exit(0); } +- ], +- [AC_MSG_RESULT([yes, required -Wa,-many]) +- use_atomic=yes], +- [AC_MSG_RESULT([no, use_atomic disabled]) +- CFLAGS="$saved_cflags" +- use_atomic=no], +- [AC_MSG_RESULT([cross compile, assume yes]) +- CFLAGS="$saved_cflags" +- use_atomic=yes]) +- ] +- ) +- else +- use_atomic=yes +- fi +- ;; +- *) +- use_atomic=yes +- ;; +- esac ++ yes) ++ use_stdatomic=yes ++ use_atomic=yes ++ ;; ++ nostd) ++ use_stdatomic=no ++ use_atomic=yes + ;; + no) +- have_stdatomic=no +- ISC_PLATFORM_HAVESTDATOMIC="#undef ISC_PLATFORM_HAVESTDATOMIC" ++ use_stdatomic=no + use_atomic=no ++ ISC_PLATFORM_HAVESTDATOMIC="#undef ISC_PLATFORM_HAVESTDATOMIC" + arch=noatomic + ;; + esac + ++if test "X$use_stdatomic" = "Xyes"; then ++ have_stdatomic=no ++ AC_MSG_CHECKING(for usable stdatomic.h) ++ AC_TRY_COMPILE([ ++ #include ++ #include ++ ], ++ [ ++ #if ATOMIC_INT_LOCK_FREE == 2 && ATOMIC_LONG_LOCK_FREE == 2 ++ atomic_int_fast32_t val = 0; atomic_fetch_add_explicit(&val, 1, memory_order_relaxed); ++ #else ++ #error stdatomic not lock free ++ #endif ++ ], ++ [AC_MSG_RESULT(yes) ++ have_stdatomic=yes ++ ISC_PLATFORM_HAVESTDATOMIC="#define ISC_PLATFORM_HAVESTDATOMIC 1"], ++ [AC_MSG_RESULT(no) ++ have_stdatomic=no ++ ISC_PLATFORM_HAVESTDATOMIC="#undef ISC_PLATFORM_HAVESTDATOMIC"]) ++else ++ have_stdatomic=no ++ ISC_PLATFORM_HAVESTDATOMIC="#undef ISC_PLATFORM_HAVESTDATOMIC" ++fi ++ + if test "X$have_stdatomic" = "Xyes"; then + AC_MSG_CHECKING(if -latomic is needed to use 64-bit stdatomic.h primitives) + AC_LINK_IFELSE( -- Gitee From 1678c676a6658c24b6f21efe40f15cdab0769627 Mon Sep 17 00:00:00 2001 From: Choice Date: Wed, 29 Apr 2020 11:37:22 +0800 Subject: [PATCH 2/3] update bind.spec. --- bind.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bind.spec b/bind.spec index 10dd7ce..defec61 100644 --- a/bind.spec +++ b/bind.spec @@ -140,6 +140,7 @@ Patch6020: CVE-2019-6465.patch Patch9000: feature-bind99-euler-range-port.patch Patch9001: bugfix-nslookup-norec.patch Patch9002: bugfix-named-log-time.patch +Patch9003: bind-named-hangs-or-cransh.patch %description Berkeley Internet Name Domain (BIND) is an implementation of the Domain Name @@ -371,6 +372,7 @@ cp -fp contrib/sdb/sqlite/zone2sqlite.c bin/sdb_tools %patch6019 -p1 %patch6020 -p1 %patch9002 -p1 +%patch9003 -p1 %build %define _configure "../configure" @@ -1045,6 +1047,12 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Thu Mar 26 2020 wangli - 9.11.4-14 +- Type:bugfix +- ID:NA +- SUG:restart +- DESC:fix named service hangs and crashes + * Thu Mar 19 2020 songnannan - 9.11.4-13 - add gdb in buildrequires -- Gitee From 6c334f42f2bb3fd98f0fae5a95a86f298d3ae3e3 Mon Sep 17 00:00:00 2001 From: Choice Date: Wed, 29 Apr 2020 11:38:05 +0800 Subject: [PATCH 3/3] update bind.spec. --- bind.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bind.spec b/bind.spec index defec61..e48c365 100644 --- a/bind.spec +++ b/bind.spec @@ -17,7 +17,7 @@ Name: bind Summary: Domain Name System (DNS) Server (named) License: MPLv2.0 Version: 9.11.4 -Release: 13 +Release: 14 Epoch: 32 Url: http://www.isc.org/products/BIND/ Source0: https://ftp.isc.org/isc/bind9/9.11.4/bind-%{version}-P2.tar.gz -- Gitee