Browse code

Add patch for CVE-2016-2774

Change-Id: I09791f1bbc9333c9e8df0cb90f5a38d2daf155f9
Reviewed-on: http://photon-jenkins.eng.vmware.com/678
Tested-by: jenkins-photon <wangnan2015@hotmail.com>
Reviewed-by: suezzelur <anishs@vmware.com>

suezzelur authored on 2016/04/01 05:55:19
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,40 @@
0
+diff -ru dhcp-4.3.3-P1/includes/site.h dhcp-4.3.3-P1-new/includes/site.h
1
+--- dhcp-4.3.3-P1/includes/site.h	2015-12-16 17:06:15.000000000 -0800
2
+@@ -292,6 +292,12 @@
3
+    this option will be removed at some time. */
4
+ /* #define INCLUDE_OLD_DHCP_ISC_ERROR_CODES */
5
+ 
6
++/* Limit the value of a file descriptor the serve will use
7
++   when accepting a connecting request.  This can be used to
8
++   limit the number of TCP connections that the server will
9
++   allow at one time.  A value of 0 means there is no limit.*/
10
++#define MAX_FD_VALUE 200
11
++
12
+ /* Include definitions for various options.  In general these
13
+    should be left as is, but if you have already defined one
14
+    of these and prefer your definition you can comment the 
15
+diff -ru dhcp-4.3.3-P1/omapip/listener.c dhcp-4.3.3-P1-new/omapip/listener.c
16
+--- dhcp-4.3.3-P1/omapip/listener.c	2015-12-16 17:06:15.000000000 -0800
17
+@@ -3,7 +3,7 @@
18
+    Subroutines that support the generic listener object. */
19
+ 
20
+ /*
21
+- * Copyright (c) 2012,2014 by Internet Systems Consortium, Inc. ("ISC")
22
++ * Copyright (c) 2012,2014,2016 by Internet Systems Consortium, Inc. ("ISC")
23
+  * Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
24
+  * Copyright (c) 1999-2003 by Internet Software Consortium
25
+  *
26
+@@ -233,6 +233,11 @@
27
+ 			return ISC_R_NORESOURCES;
28
+ 		return ISC_R_UNEXPECTED;
29
+ 	}
30
++
31
++	if ((MAX_FD_VALUE != 0) && (socket > MAX_FD_VALUE)) {
32
++		close(socket);
33
++		return (ISC_R_NORESOURCES);
34
++	}
35
+ 	
36
+ #if defined (TRACING)
37
+ 	/* If we're recording a trace, remember the connection. */
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	Dynamic host configuration protocol
2 2
 Name:		dhcp
3 3
 Version:	4.3.3
4
-Release:	1%{?dist}
4
+Release:	2%{?dist}
5 5
 License:	ISC
6 6
 Url:      	http://isc.org/products/DHCP/
7 7
 Source0:  	ftp://ftp.isc.org/isc/%{name}/%{version}/%{name}-%{version}-P1.tar.gz
... ...
@@ -10,7 +10,7 @@ Group:		System Environment/Base
10 10
 Vendor:		VMware, Inc.
11 11
 Distribution:	Photon
12 12
 Patch0:		http://www.linuxfromscratch.org/patches/blfs/svn/dhcp-4.3.3-P1-client_script-1.patch
13
-#Patch1:     http://www.linuxfromscratch.org/patches/blfs/svn/dhcp-4.3.3-P1-missing_ipv6-1.patch
13
+Patch1:         dhcp-4.3.3-CVE-2016-2774.patch
14 14
 BuildRequires:	systemd
15 15
 %description
16 16
 The ISC DHCP package contains both the client and server programs for DHCP. dhclient (the client) is used for connecting to a network which uses DHCP to assign network addresses. dhcpd (the server) is used for assigning network addresses on private networks
... ...
@@ -42,7 +42,7 @@ The ISC DHCP Client, dhclient, provides a means for configuring one or more netw
42 42
 %prep
43 43
 %setup -qn %{name}-%{version}-P1
44 44
 %patch0 -p1
45
-#%patch1 -p1
45
+%patch1 -p1
46 46
 %build
47 47
 CFLAGS="-D_PATH_DHCLIENT_SCRIPT='\"/sbin/dhclient-script\"'         \
48 48
         -D_PATH_DHCPD_CONF='\"/etc/dhcp/dhcpd.conf\"'               \
... ...
@@ -147,7 +147,9 @@ install -v -dm 755 %{buildroot}/var/lib/dhclient
147 147
 %{_mandir}/man8/dhclient.8.gz
148 148
 
149 149
 %changelog
150
-*   Fri Jan 22 2016 Xiaolin Li <xiaolinl@vmware.com> 4.3.3-1
151
--   Updated to version 4.3.3
150
+* 	Wed Mar 30 2016 Anish Swaminathan <anishs@vmware.com>  4.3.3-2
151
+- 	Add patch for CVE-2016-2774
152
+*   	Fri Jan 22 2016 Xiaolin Li <xiaolinl@vmware.com> 4.3.3-1
153
+-   	Updated to version 4.3.3
152 154
 *	Wed Jul 15 2015 Divya Thaluru <dthaluru@vmware.com> 4.3.2-1
153 155
 -	Initial build./