LD_LIBRARY_PATH can only be used to reorder system search paths, which
is not useful functionality.
This makes an exploitable unbounded alloca in _dl_init_paths unreachable
for AT_SECURE=1 programs.
(cherry picked from commit
f6110a8fee2ca36f8e2d2abecf3cba9fa7b8ea7d)
+2017-06-19 Florian Weimer <fweimer@redhat.com>
+
+ [BZ #21624]
+ CVE-2017-1000366
+ * elf/rtld.c (process_envvars): Ignore LD_LIBRARY_PATH for
+ __libc_enable_secure.
+
2017-04-11 Adhemerval Zanella <adhemerval.zanella@linaro.org>
* posix/globtest.sh: Add cleanup routine on trap 0.
[20177] $dp is not initialized correctly in sysdeps/hppa/start.S
[20357] Incorrect cos result for 1.5174239687223976
[21289] Fix symbol redirect for fts_set
+ [21624] Unsafe alloca allows local attackers to alias stack and heap (CVE-2017-1000366)
\f
Version 2.23
case 12:
/* The library search path. */
- if (memcmp (envline, "LIBRARY_PATH", 12) == 0)
+ if (!__libc_enable_secure
+ && memcmp (envline, "LIBRARY_PATH", 12) == 0)
{
library_path = &envline[13];
break;