25489439 problem in LIBRARY/LIBEVENT s11u3-sru
authorRich Burridge <rich.burridge@oracle.com>
Tue, 07 Feb 2017 16:50:47 -0800
branchs11u3-sru
changeset 7653 02748c64c0e3
parent 7644 b5a859411118
child 7654 61774c5d9189
25489439 problem in LIBRARY/LIBEVENT
components/libevent/patches/CVE-2016-10195.patch
components/libevent/patches/CVE-2016-10197.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libevent/patches/CVE-2016-10195.patch	Tue Feb 07 16:50:47 2017 -0800
@@ -0,0 +1,29 @@
+Fix for CVE-2016-10195
+
+More details at:
+
+  https://github.com/libevent/libevent/issues/317
+
+Based on commit at:
+
+  https://github.com/libevent/libevent/commit/96f64a022014a208105ead6c8a7066018449d86d
+
+--- libevent-1.4.14/evdns.c.orig	2017-02-03 06:49:17.767210211 +0000
++++ libevent-1.4.14/evdns.c	2017-02-03 06:50:41.005061826 +0000
[email protected]@ -772,7 +772,6 @@
+ 
+ 	for(;;) {
+ 		u8 label_len;
+-		if (j >= length) return -1;
+ 		GET8(label_len);
+ 		if (!label_len) break;
+ 		if (label_len & 0xc0) {
[email protected]@ -792,7 +791,7 @@
+ 			if (cp + 1 >= end) return -1;
+ 			*cp++ = '.';
+ 		}
+-		if (cp + label_len >= end) return -1;
++		if (j + label_len > length) return -1;
+ 		memcpy(cp, packet + j, label_len);
+ 		cp += label_len;
+ 		j += label_len;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libevent/patches/CVE-2016-10197.patch	Tue Feb 07 16:50:47 2017 -0800
@@ -0,0 +1,25 @@
+Fix for CVE-2016-10197
+
+More details at:
+
+  https://github.com/libevent/libevent/issues/332
+
+Based on commit at:
+
+  https://github.com/libevent/libevent/commit/ec65c42052d95d2c23d1d837136d1cf1d9ecef9e
+
+--- libevent-1.4.14/evdns.c.orig	2017-02-03 06:49:17.767210211 +0000
++++ libevent-1.4.14/evdns.c	2017-02-03 06:50:41.005061826 +0000
[email protected]@ -2492,9 +2491,11 @@
+ static char *
+ search_make_new(const struct search_state *const state, int n, const char *const base_name) {
+ 	const int base_len = strlen(base_name);
+-	const char need_to_append_dot = base_name[base_len - 1] == '.' ? 0 : 1;
++	char need_to_append_dot;
+ 	struct search_domain *dom;
+ 
++	if (!base_len) return NULL;
++	need_to_append_dot = base_name[base_len - 1] == '.' ? 0 : 1;
+ 	for (dom = state->head; dom; dom = dom->next) {
+ 		if (!n--) {
+ 			/* this is the postfix we want */