mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
Loader.so+LibELF: Do not read environment variables if AT_SECURE is set
AT_SECURE is set in the auxiliary vector when we execute setuid/setgid programs. In those cases, we do not want to read environment variables that influence the logic of the dynamic loader, as they can be controlled by the user.
This commit is contained in:
parent
20974b0772
commit
a4b74cba0b
3 changed files with 22 additions and 8 deletions
|
@ -35,7 +35,7 @@ namespace ELF {
|
|||
class DynamicLinker {
|
||||
public:
|
||||
static DynamicObject::SymbolLookupResult lookup_global_symbol(const char* symbol);
|
||||
[[noreturn]] static void linker_main(String&& main_program_name, int fd, int argc, char** argv, char** envp);
|
||||
[[noreturn]] static void linker_main(String&& main_program_name, int fd, bool is_secure, int argc, char** argv, char** envp);
|
||||
|
||||
private:
|
||||
DynamicLinker() = delete;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue