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

This commit is contained in:
Siddhesh Poyarekar 2015-02-27 17:17:29 +05:30
parent a2bbe283f4
commit cfa5cfd56f
2 changed files with 27 additions and 0 deletions

23
glibc-rh1184234.patch Normal file
View File

@ -0,0 +1,23 @@
commit 9317ea653afc26402387cac67042f9890af6add2
Author: Bram <bug_rh@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;
}

View File

@ -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@redhat.com> - 2.20-7
- Remove LIB_LANG since we don't install locales in /usr/lib/locale anymore.