about summary refs log tree commit diff
path: root/src/env/__init_security.c
Commit message (Collapse)AuthorAgeFilesLines
* first attempt at enabling stack protector supportRich Felker2012-04-241-0/+7
| | | | | | | | the code is written to pre-init the thread pointer in static linked programs that pull in __stack_chk_fail or dynamic-linked programs that lookup the symbol. no explicit canary is set; the canary will be whatever happens to be in the thread structure at the offset gcc hard-coded. this can be improved later.
* security hardening: ensure suid programs have valid stdin/out/errRich Felker2011-08-231-0/+26
this behavior (opening fds 0-2 for a suid program) is explicitly allowed (but not required) by POSIX to protect badly-written suid programs from clobbering files they later open. this commit does add some cost in startup code, but the availability of auxv and the security flag will be useful elsewhere in the future. in particular auxv is needed for static-linked vdso support, which is still waiting to be committed (sorry nik!)