mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibC: Don't honor LIBC_* malloc debugging flags in AT_SECURE context
Just ignore all these environment flags if the AT_SECURE flag is set in the program's auxiliary vector. This prevents a user from tricking set-uid programs into dumping debug information via environment flags.
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 22:41:54 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/fc4eae87f88
@@ -45,6 +45,7 @@ void serenity_dump_malloc_stats(void);
|
||||
void free(void*);
|
||||
__attribute__((alloc_size(2))) void* realloc(void* ptr, size_t);
|
||||
char* getenv(const char* name);
|
||||
char* secure_getenv(const char* name);
|
||||
int putenv(char*);
|
||||
int unsetenv(const char*);
|
||||
int clearenv(void);
|
||||
@@ -106,4 +107,6 @@ int posix_openpt(int flags);
|
||||
int grantpt(int fd);
|
||||
int unlockpt(int fd);
|
||||
|
||||
long getauxval(long type);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
Reference in New Issue
Block a user