From 45c988ee4f52e7ac5e64d35e28291dfe4494e013 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Jul 17 2007 06:09:36 +0000 Subject: handle integer overflow in isc_time_secondsastimet more gracefully (#247856) --- diff --git a/bind-9.5-overflow.patch b/bind-9.5-overflow.patch new file mode 100644 index 0000000..34b7bed --- /dev/null +++ b/bind-9.5-overflow.patch @@ -0,0 +1,24 @@ +diff -up bind-9.5.0a5/lib/isc/pthreads/condition.c.overflow bind-9.5.0a5/lib/isc/pthreads/condition.c +--- bind-9.5.0a5/lib/isc/pthreads/condition.c.overflow 2007-07-17 07:53:59.000000000 +0200 ++++ bind-9.5.0a5/lib/isc/pthreads/condition.c 2007-07-17 07:55:08.000000000 +0200 +@@ -43,7 +43,7 @@ isc_condition_waituntil(isc_condition_t + * POSIX defines a timespec's tv_sec as time_t. + */ + result = isc_time_secondsastimet(t, &ts.tv_sec); +- if (result != ISC_R_SUCCESS) ++ if (result != ISC_R_RANGE && result != ISC_R_SUCCESS) + return (result); + + /*! +diff -up bind-9.5.0a5/lib/isc/unix/time.c.overflow bind-9.5.0a5/lib/isc/unix/time.c +--- bind-9.5.0a5/lib/isc/unix/time.c.overflow 2007-02-14 01:27:27.000000000 +0100 ++++ bind-9.5.0a5/lib/isc/unix/time.c 2007-07-17 07:53:08.000000000 +0200 +@@ -379,6 +379,9 @@ isc_time_secondsastimet(const isc_time_t + * (Let's hope the compiler got the actual test right.) + */ + UNUSED(i); ++ ++ /* Means that t->seconds > maximum value in time_t and we have int time_t */ ++ seconds = INT_MAX; + return (ISC_R_RANGE); + } diff --git a/bind.spec b/bind.spec index f809a14..693b0a1 100644 --- a/bind.spec +++ b/bind.spec @@ -16,7 +16,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv Name: bind License: BSD-like Version: 9.5.0a5 -Release: 2.1%{?dist} +Release: 3%{?dist} Epoch: 31 Url: http://www.isc.org/products/BIND/ Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -56,6 +56,7 @@ Patch52: bind-9.3.3-edns.patch Patch63: bind-9.4.0-dnssec-directory.patch Patch69: bind-9.5.0-generate-xml.patch Patch70: bind-9.5.0-errno-init.patch +Patch71: bind-9.5-overflow.patch # SDB patches Patch11: bind-9.3.2b2-sdbsrc.patch @@ -264,6 +265,7 @@ pushd contrib/idn popd %patch65 -p1 -b .idn %patch70 -p1 -b .errno-init +%patch71 -p1 -b .overflow :; @@ -414,7 +416,7 @@ for f in my.internal.zone.db slaves/my.slave.internal.zone.db slaves/my.ddns.int echo '@ in soa localhost. root 1 3H 15M 1W 1D ns localhost.' > sample/var/named/$f; done -/usr/bin/tail -n '+'`/bin/egrep -n '\\$Id: bind.spec,v 1.192 2007/07/16 08:42:55 atkac Exp $/+1/' | bc` bin/rndc/rndc.conf | sed '/Sample rndc configuration file./{p;i\ +/usr/bin/tail -n '+'`/bin/egrep -n '\\$Id: bind.spec,v 1.193 2007/07/17 06:09:36 atkac Exp $/+1/' | bc` bin/rndc/rndc.conf | sed '/Sample rndc configuration file./{p;i\ *\ * NOTE: you only need to create this file if it is to\ * differ from the following default contents: @@ -701,7 +703,10 @@ rm -rf ${RPM_BUILD_ROOT} %endif %changelog -* Mon Jul 16 2007 Adam Tkac 31:9.5.0a5-2.1.fc8 +* Tue Jul 17 2007 Adam Tkac 31:9.5.0a5-3.fc8 +- handle integer overflow in isc_time_secondsastimet function gracefully (#247856) + +* Mon Jul 16 2007 Adam Tkac 31:9.5.0a5-2.2.fc8 - moved chroot configfiles into chroot subpackage (#248306) * Thu Jul 02 2007 Adam Tkac 31:9.5.0a5-2.fc8