Fix local root vulnerability.
Security: Advisory will be coming soon. X-MFC-After: 30 seconds
This commit is contained in:
parent
34605f8542
commit
f349fbc4a6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=199979
@ -366,12 +366,12 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp)
|
||||
* future processes to honor the potentially un-safe variables.
|
||||
*/
|
||||
if (!trust) {
|
||||
unsetenv(LD_ "PRELOAD");
|
||||
unsetenv(LD_ "LIBMAP");
|
||||
unsetenv(LD_ "LIBRARY_PATH");
|
||||
unsetenv(LD_ "LIBMAP_DISABLE");
|
||||
unsetenv(LD_ "DEBUG");
|
||||
unsetenv(LD_ "ELF_HINTS_PATH");
|
||||
if (unsetenv(LD_ "PRELOAD") || unsetenv(LD_ "LIBMAP") ||
|
||||
unsetenv(LD_ "LIBRARY_PATH") || unsetenv(LD_ "LIBMAP_DISABLE") ||
|
||||
unsetenv(LD_ "DEBUG") || unsetenv(LD_ "ELF_HINTS_PATH")) {
|
||||
_rtld_error("environment corrupt; aborting");
|
||||
die();
|
||||
}
|
||||
}
|
||||
ld_debug = getenv(LD_ "DEBUG");
|
||||
libmap_disable = getenv(LD_ "LIBMAP_DISABLE") != NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user