packages: glibc/glibc.spec, glibc/glibc-origin.patch (NEW) - rel 6; SECURIT...

arekm arekm at pld-linux.org
Tue Oct 19 17:46:57 CEST 2010


Author: arekm                        Date: Tue Oct 19 15:46:57 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 6; SECURITY FIX for http://seclists.org/fulldisclosure/2010/Oct/257 from fedora

---- Files affected:
packages/glibc:
   glibc.spec (1.881 -> 1.882) , glibc-origin.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/glibc/glibc.spec
diff -u packages/glibc/glibc.spec:1.881 packages/glibc/glibc.spec:1.882
--- packages/glibc/glibc.spec:1.881	Tue Sep 14 23:43:37 2010
+++ packages/glibc/glibc.spec	Tue Oct 19 17:46:52 2010
@@ -35,7 +35,7 @@
 Summary(uk.UTF-8):	GNU libc версії
 Name:		glibc
 Version:	2.12.1
-Release:	5
+Release:	6
 Epoch:		6
 License:	LGPL v2.1+
 Group:		Libraries
@@ -78,6 +78,7 @@
 Patch29:	%{name}-arm-alignment-fix.patch
 Patch30:	%{name}-static-glro-init.patch
 Patch31:	%{name}-newmake.patch
+Patch32:	%{name}-origin.patch
 URL:		http://www.gnu.org/software/libc/
 %{?with_selinux:BuildRequires:	audit-libs-devel}
 BuildRequires:	autoconf
@@ -925,6 +926,7 @@
 %patch29 -p1
 %patch30 -p1
 %patch31 -p1
+%patch32 -p1
 
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
@@ -1689,6 +1691,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.882  2010/10/19 15:46:52  arekm
+- rel 6; SECURITY FIX for http://seclists.org/fulldisclosure/2010/Oct/257 from fedora
+
 Revision 1.881  2010/09/14 21:43:37  qwiat
 - added 'jv' locale dir
 

================================================================
Index: packages/glibc/glibc-origin.patch
diff -u /dev/null packages/glibc/glibc-origin.patch:1.1
--- /dev/null	Tue Oct 19 17:46:57 2010
+++ packages/glibc/glibc-origin.patch	Tue Oct 19 17:46:52 2010
@@ -0,0 +1,76 @@
+;2010-10-18  Andreas Schwab  <schwab at redhat.com>
+;
+;	* elf/dl-load.c (is_dst): Remove last parameter.
+;	(_dl_dst_count): Ignore $ORIGIN in privileged programs.
+;	(_dl_dst_substitute): Likewise.
+--- glibc-2.12.1-7-gfc0ed7b/elf/dl-load.c
++++ glibc-2.12.1-3/elf/dl-load.c
+@@ -169,8 +169,7 @@ local_strdup (const char *s)
+ 
+ 
+ static size_t
+-is_dst (const char *start, const char *name, const char *str,
+-	int is_path, int secure)
++is_dst (const char *start, const char *name, const char *str, int is_path)
+ {
+   size_t len;
+   bool is_curly = false;
+@@ -199,11 +198,6 @@ is_dst (const char *start, const char *name, const char *str,
+ 	   && (!is_path || name[len] != ':'))
+     return 0;
+ 
+-  if (__builtin_expect (secure, 0)
+-      && ((name[len] != '\0' && (!is_path || name[len] != ':'))
+-	  || (name != start + 1 && (!is_path || name[-2] != ':'))))
+-    return 0;
+-
+   return len;
+ }
+ 
+@@ -218,13 +212,12 @@ _dl_dst_count (const char *name, int is_path)
+     {
+       size_t len;
+ 
+-      /* $ORIGIN is not expanded for SUID/GUID programs (except if it
+-	 is $ORIGIN alone) and it must always appear first in path.  */
++      /* $ORIGIN is not expanded for SUID/GUID programs.  */
+       ++name;
+-      if ((len = is_dst (start, name, "ORIGIN", is_path,
+-			 INTUSE(__libc_enable_secure))) != 0
+-	  || (len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0
+-	  || (len = is_dst (start, name, "LIB", is_path, 0)) != 0)
++      if (((len = is_dst (start, name, "ORIGIN", is_path)) != 0
++	   && !INTUSE(__libc_enable_secure))
++	  || (len = is_dst (start, name, "PLATFORM", is_path)) != 0
++	  || (len = is_dst (start, name, "LIB", is_path)) != 0)
+ 	++cnt;
+ 
+       name = strchr (name + len, '$');
+@@ -256,9 +249,12 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
+ 	  size_t len;
+ 
+ 	  ++name;
+-	  if ((len = is_dst (start, name, "ORIGIN", is_path,
+-			     INTUSE(__libc_enable_secure))) != 0)
++	  if ((len = is_dst (start, name, "ORIGIN", is_path)) != 0)
+ 	    {
++	      /* Ignore this path element in SUID/SGID programs.  */
++	      if (INTUSE(__libc_enable_secure))
++		repl = (const char *) -1;
++	      else
+ #ifndef SHARED
+ 	      if (l == NULL)
+ 		repl = _dl_get_origin ();
+@@ -266,9 +262,9 @@ _dl_dst_substitute (struct link_map *l, const char *name, char *result,
+ #endif
+ 		repl = l->l_origin;
+ 	    }
+-	  else if ((len = is_dst (start, name, "PLATFORM", is_path, 0)) != 0)
++	  else if ((len = is_dst (start, name, "PLATFORM", is_path)) != 0)
+ 	    repl = GLRO(dl_platform);
+-	  else if ((len = is_dst (start, name, "LIB", is_path, 0)) != 0)
++	  else if ((len = is_dst (start, name, "LIB", is_path)) != 0)
+ 	    repl = DL_DST_LIB;
+ 
+ 	  if (repl != NULL && repl != (const char *) -1)
+
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/glibc/glibc.spec?r1=1.881&r2=1.882&f=u



More information about the pld-cvs-commit mailing list