[glibc/f21] Fix segmentation fault when LD_LIBRARY_PATH contains only non-existing paths (#1184234)

Siddhesh Poyarekar siddhesh at fedoraproject.org
Fri Feb 27 11:50:16 UTC 2015


commit cfa5cfd56f9d9ad2f97fb58de2ce7dd68980983f
Author: Siddhesh Poyarekar <siddhesh at redhat.com>
Date:   Fri Feb 27 17:17:29 2015 +0530

    Fix segmentation fault when LD_LIBRARY_PATH contains only non-existing paths (#1184234)

 glibc-rh1184234.patch | 23 +++++++++++++++++++++++
 glibc.spec            |  4 ++++
 2 files changed, 27 insertions(+)
---
diff --git a/glibc-rh1184234.patch b/glibc-rh1184234.patch
new file mode 100644
index 0000000..f81dc6c
--- /dev/null
+++ b/glibc-rh1184234.patch
@@ -0,0 +1,23 @@
+commit 9317ea653afc26402387cac67042f9890af6add2
+Author: Bram <bug_rh at spam.wizbit.be>
+Date:   Thu Apr 18 16:50:49 2013 +0200
+
+    Fix segmentation fault when LD_LIBRARY_PATH contains only non-existings paths
+
+diff --git a/elf/dl-load.c b/elf/dl-load.c
+index 73174aa..41b91fc 100644
+--- a/elf/dl-load.c
++++ b/elf/dl-load.c
+@@ -1889,9 +1889,9 @@ open_path (const char *name, size_t namelen, int mode,
+       if (sps->malloced)
+ 	free (sps->dirs);
+ 
+-      /* rtld_search_dirs is attribute_relro, therefore avoid writing
+-	 into it.  */
+-      if (sps != &rtld_search_dirs)
++      /* rtld_search_dirs and env_path_list are attribute_relro, therefore
++         avoid writing into it.  */
++      if (sps != &rtld_search_dirs && sps != &env_path_list)
+ 	sps->dirs = (void *) -1;
+     }
+ 
diff --git a/glibc.spec b/glibc.spec
index 9673616..021ca10 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -210,6 +210,7 @@ Patch1001: %{name}-rh1133508.patch
 Patch1002: %{name}-rh1167569.patch
 Patch1003: %{name}-rh1175370.patch
 Patch1004: %{name}-rh1188237.patch
+Patch1005: %{name}-rh1184234.patch
 
 ##############################################################################
 #
@@ -581,6 +582,7 @@ package or when debugging this package.
 %patch1002 -p1
 %patch1003 -p1
 %patch1004 -p1
+%patch1005 -p1
 
 ##############################################################################
 # %%prep - Additional prep required...
@@ -1720,6 +1722,8 @@ rm -f *.filelist*
 - wordexp fails to honour WRDE_NOCMD (CVE-2014-7817, #1167569).
 - Avoid infinite loop in nss_dns getnetbyname (CVE-2014-9402, #1175370).
 - wscanf allocates too little memory (CVE-2015-1472, #1188237).
+- Fix segmentation fault when LD_LIBRARY_PATH contains only non-existing
+  paths (#1184234).
 
 * Tue Jan 06 2015 Siddhesh Poyarekar <siddhesh at redhat.com> - 2.20-7
 - Remove LIB_LANG since we don't install locales in /usr/lib/locale anymore.


More information about the scm-commits mailing list