[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r5856 - in glibc-package/branches/glibc-branch-wheezy/debian: . patches patches/any



Author: aurel32
Date: 2013-12-03 14:31:23 +0000 (Tue, 03 Dec 2013)
New Revision: 5856

Added:
   glibc-package/branches/glibc-branch-wheezy/debian/patches/any/cvs-CVE-2013-1914.diff
Modified:
   glibc-package/branches/glibc-branch-wheezy/debian/changelog
   glibc-package/branches/glibc-branch-wheezy/debian/patches/series
Log:
patches/cvs-CVE-2013-1914.diff: backport stack overflow fixes in
getaddrinfo() addressing CVE-2013-1914 (Closes: #704623).


Modified: glibc-package/branches/glibc-branch-wheezy/debian/changelog
===================================================================
--- glibc-package/branches/glibc-branch-wheezy/debian/changelog	2013-12-03 14:12:27 UTC (rev 5855)
+++ glibc-package/branches/glibc-branch-wheezy/debian/changelog	2013-12-03 14:31:23 UTC (rev 5856)
@@ -7,6 +7,8 @@
     addressing CVE-2012-4412 and CVE-2012-4424 (Closes: #687530, #689423).
   * patches/any/CVE-2013-0242.diff: Backport buffer overrun in regexp matcher
     addressing CVE-2013-0242 (Closes: #699399).
+  * patches/cvs-CVE-2013-1914.diff: backport stack overflow fixes in
+    getaddrinfo() addressing CVE-2013-1914 (Closes: #704623).
   * patches/any/cvs-findlocale-div-by-zero.diff: patch from upstream to fix
     a SIGFPE when locale-archive has been corrupted to all zeros (Closes:
     #718890, #730336).

Added: glibc-package/branches/glibc-branch-wheezy/debian/patches/any/cvs-CVE-2013-1914.diff
===================================================================
--- glibc-package/branches/glibc-branch-wheezy/debian/patches/any/cvs-CVE-2013-1914.diff	                        (rev 0)
+++ glibc-package/branches/glibc-branch-wheezy/debian/patches/any/cvs-CVE-2013-1914.diff	2013-12-03 14:31:23 UTC (rev 5856)
@@ -0,0 +1,48 @@
+2013-04-03  Andreas Schwab  <schwab@suse.de>
+
+	[BZ #15330]
+	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Allocate results and
+	order arrays from heap if bigger than alloca cutoff.
+
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -2207,11 +2207,27 @@
+       __typeof (once) old_once = once;
+       __libc_once (once, gaiconf_init);
+       /* Sort results according to RFC 3484.  */
+-      struct sort_result results[nresults];
+-      size_t order[nresults];
++      struct sort_result *results;
++      size_t *order;
+       struct addrinfo *q;
+       struct addrinfo *last = NULL;
+       char *canonname = NULL;
++      bool malloc_results;
++
++      malloc_results
++	= !__libc_use_alloca (nresults * (sizeof (*results) + sizeof (size_t)));
++      if (malloc_results)
++	{
++	  results = malloc (nresults * (sizeof (*results) + sizeof (size_t)));
++	  if (results == NULL)
++	    {
++	      free (in6ai);
++	      return EAI_MEMORY;
++	    }
++	}
++      else
++	results = alloca (nresults * (sizeof (*results) + sizeof (size_t)));
++      order = (size_t *) (results + nresults);
+ 
+       /* If we have information about deprecated and temporary addresses
+ 	 sort the array now.  */
+@@ -2397,6 +2413,9 @@
+ 
+       /* Fill in the canonical name into the new first entry.  */
+       p->ai_canonname = canonname;
++
++      if (malloc_results)
++	free (results);
+     }
+ 
+   free (in6ai);

Modified: glibc-package/branches/glibc-branch-wheezy/debian/patches/series
===================================================================
--- glibc-package/branches/glibc-branch-wheezy/debian/patches/series	2013-12-03 14:12:27 UTC (rev 5855)
+++ glibc-package/branches/glibc-branch-wheezy/debian/patches/series	2013-12-03 14:31:23 UTC (rev 5856)
@@ -377,4 +377,5 @@
 any/local-tst-eintr1-eagain.diff
 any/cvs-CVE-2012-44xx.diff
 any/cvs-CVE-2013-0242.diff
+any/cvs-CVE-2013-1914.diff
 any/cvs-findlocale-div-by-zero.diff


Reply to: