From 4424e7491bc249a24bf1678282a66adecea53b03 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Aug 06 2009 00:04:51 +0000 Subject: - Upgrade to dhcp-4.1.0p1, which is the official upstream release to fix CVE-2009-0692 --- diff --git a/.cvsignore b/.cvsignore index f98d3ea..419cbe7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -dhcp-4.1.0.tar.gz ldap-for-dhcp-4.1.0-2.tar.gz +dhcp-4.1.0p1.tar.gz diff --git a/dhcp-4.1.0-CVE-2009-0692.patch b/dhcp-4.1.0-CVE-2009-0692.patch deleted file mode 100644 index 88afc11..0000000 --- a/dhcp-4.1.0-CVE-2009-0692.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up dhcp-4.1.0/client/dhclient.c.CVE-2009-0692 dhcp-4.1.0/client/dhclient.c ---- dhcp-4.1.0/client/dhclient.c.CVE-2009-0692 2008-06-11 10:17:10.000000000 -1000 -+++ dhcp-4.1.0/client/dhclient.c 2009-08-05 11:32:24.000000000 -1000 -@@ -3054,8 +3054,15 @@ void script_write_params (client, prefix - if (data.len > 3) { - struct iaddr netmask, subnet, broadcast; - -- memcpy (netmask.iabuf, data.data, data.len); -- netmask.len = data.len; -+ /* -+ * No matter the length of the subnet-mask option, -+ * use only the first four octets. Note that -+ * subnet-mask options longer than 4 octets are not -+ * in conformance with RFC 2132, but servers with this -+ * flaw do exist. -+ */ -+ memcpy(netmask.iabuf, data.data, 4); -+ netmask.len = 4; - data_string_forget (&data, MDL); - - subnet = subnet_number (lease -> address, netmask); diff --git a/dhcp.spec b/dhcp.spec index a8986dc..726c1a0 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -4,13 +4,16 @@ # Where dhcp configuration files are stored %define dhcpconfdir %{_sysconfdir}/dhcp +# Base version number from ISC +%define basever 4.1.0 + # LDAP patch version -%define ldappatchver %{version}-2 +%define ldappatchver %{basever}-2 Summary: Dynamic host configuration protocol software Name: dhcp -Version: 4.1.0 -Release: 25%{?dist} +Version: %{basever}p1 +Release: 1%{?dist} # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to # dcantrell maintaining the package) made incorrect use of the epoch and # that's why it is at 12 now. It should have never been used, but it was. @@ -20,7 +23,7 @@ License: ISC Group: System Environment/Daemons URL: http://isc.org/products/DHCP/ Source0: ftp://ftp.isc.org/isc/%{name}/%{name}-%{version}.tar.gz -Source1: http://dcantrel.fedorapeople.org/dhcp/ldap-patch/ldap-for-dhcp-%{ldappatchver}.tar.gz +Source1: http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-%{ldappatchver}.tar.gz Source2: dhcpd.init Source3: dhcrelay.init Source4: dhclient-script @@ -47,8 +50,7 @@ Patch17: %{name}-4.1.0-invalid-dhclient-conf.patch Patch18: %{name}-4.1.0-missing-ipv6-not-fatal.patch Patch19: %{name}-4.1.0-IFNAMSIZ.patch Patch20: %{name}-4.1.0-add_timeout_when_NULL.patch -Patch21: %{name}-4.1.0-CVE-2009-0692.patch -Patch22: %{name}-4.1.0-CVE-2009-1892.patch +Patch21: %{name}-4.1.0-CVE-2009-1892.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: autoconf @@ -115,7 +117,7 @@ libdhcpctl and libomapi static libraries are also included in this package. %setup -T -D -a 1 # Add in LDAP support -%{__patch} -p1 < ldap-for-dhcp-%{ldappatchver}/%{name}-%{version}-ldap.patch +%{__patch} -p1 < ldap-for-dhcp-%{ldappatchver}/%{name}-%{basever}-ldap.patch # Replace the standard ISC warning message about requesting help with an # explanation that this is a patched build of ISC DHCP and bugs should be @@ -201,13 +203,9 @@ libdhcpctl and libomapi static libraries are also included in this package. # (Submitted to dhcp-bugs@isc.org - [ISC-Bugs #19867]) %patch20 -p1 -# Fix for CVE-2009-0692 (patch from Mandriva SRPM) -# http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0692 -%patch21 -p1 - # Fix for CVE-2009-1892 (patch from Mandriva SRPM) # http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-1892 -%patch22 -p1 +%patch21 -p1 # Copy in documentation and example scripts for LDAP patch to dhcpd %{__install} -p -m 0755 ldap-for-dhcp-%{ldappatchver}/dhcpd-conf-to-ldap contrib/ @@ -454,6 +452,10 @@ fi %attr(0644,root,root) %{_mandir}/man3/omapi.3.gz %changelog +* Wed Aug 05 2009 David Cantrell - 12:4.1.0p1-1 +- Upgrade to dhcp-4.1.0p1, which is the official upstream release to fix + CVE-2009-0692 + * Wed Aug 05 2009 David Cantrell - 12:4.1.0-25 - Fix for CVE-2009-0692 - Fix for CVE-2009-1892 (#511834) diff --git a/sources b/sources index 1ba4b59..d18aaa7 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -1fffed2e8c3d67b111316d6a9b33db7a dhcp-4.1.0.tar.gz 04d735015e104e3e6377e7fb80fd4fce ldap-for-dhcp-4.1.0-2.tar.gz +325ff8338c5a21f89d5304ac13ffebdf dhcp-4.1.0p1.tar.gz