wok-stable rev 12448
glibc: CVE-2015-0235 fix (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jan 30 16:34:55 2015 +0100 (2015-01-30) |
parents | 0ef4ad6ff5da |
children | 5fef73a70ef2 |
files | glibc/stuff/glibc-2.13-CVE-2015-0235.patch |
line diff
1.1 --- a/glibc/stuff/glibc-2.13-CVE-2015-0235.patch Thu Jan 29 13:01:13 2015 +0100 1.2 +++ b/glibc/stuff/glibc-2.13-CVE-2015-0235.patch Fri Jan 30 16:34:55 2015 +0100 1.3 @@ -14,7 +14,15 @@ 1.4 return -1; 1.5 } 1.6 1.7 -@@ -90,8 +93,9 @@ 1.8 +@@ -84,14 +87,16 @@ 1.9 + } 1.10 + 1.11 + size_needed = (sizeof (*host_addr) 1.12 +- + sizeof (*h_addr_ptrs) + strlen (name) + 1); 1.13 ++ + sizeof (*h_addr_ptrs) 1.14 ++ + sizeof (*h_alias_ptr) + strlen (name) + 1); 1.15 + 1.16 + if (buffer_size == NULL) 1.17 { 1.18 if (buflen < size_needed) 1.19 { 1.20 @@ -25,7 +33,7 @@ 1.21 __set_errno (ERANGE); 1.22 goto done; 1.23 } 1.24 -@@ -110,7 +114,7 @@ 1.25 +@@ -110,7 +115,7 @@ 1.26 *buffer_size = 0; 1.27 __set_errno (save); 1.28 if (h_errnop != NULL) 1.29 @@ -34,7 +42,7 @@ 1.30 *result = NULL; 1.31 goto done; 1.32 } 1.33 -@@ -150,7 +154,9 @@ 1.34 +@@ -150,7 +155,9 @@ 1.35 if (! ok) 1.36 { 1.37 *h_errnop = HOST_NOT_FOUND; 1.38 @@ -45,7 +53,7 @@ 1.39 *result = NULL; 1.40 goto done; 1.41 } 1.42 -@@ -202,15 +208,6 @@ 1.43 +@@ -202,15 +209,6 @@ 1.44 1.45 if ((isxdigit (name[0]) && strchr (name, ':') != NULL) || name[0] == ':') 1.46 { 1.47 @@ -61,7 +69,7 @@ 1.48 switch (af) 1.49 { 1.50 default: 1.51 -@@ -226,7 +223,10 @@ 1.52 +@@ -226,7 +224,10 @@ 1.53 /* This is not possible. We cannot represent an IPv6 address 1.54 in an `struct in_addr' variable. */ 1.55 *h_errnop = HOST_NOT_FOUND; 1.56 @@ -73,7 +81,7 @@ 1.57 goto done; 1.58 1.59 case AF_INET6: 1.60 -@@ -234,42 +234,6 @@ 1.61 +@@ -234,42 +235,6 @@ 1.62 break; 1.63 } 1.64 1.65 @@ -116,7 +124,7 @@ 1.66 for (cp = name;; ++cp) 1.67 { 1.68 if (!*cp) 1.69 -@@ -282,7 +246,9 @@ 1.70 +@@ -282,7 +247,9 @@ 1.71 if (inet_pton (AF_INET6, name, host_addr) <= 0) 1.72 { 1.73 *h_errnop = HOST_NOT_FOUND; 1.74 @@ -127,3 +135,15 @@ 1.75 *result = NULL; 1.76 goto done; 1.77 } 1.78 +--- glibc-2.13/nss/getXXbyYY_r.c 1.79 ++++ glibc-2.13/nss/getXXbyYY_r.c 1.80 +@@ -180,6 +180,9 @@ 1.81 + case -1: 1.82 + return errno; 1.83 + case 1: 1.84 ++#ifdef NEED_H_ERRNO 1.85 ++ any_service = true; 1.86 ++#endif 1.87 + goto done; 1.88 + } 1.89 + #endif