summaryrefslogtreecommitdiff
path: root/src/env/__stack_chk_fail.c
AgeCommit message (Collapse)AuthorLines
2012-08-25ensure canary is setup if stack-prot libs are dlopen'd into non-ssp appRich Felker-1/+2
previously, this usage could lead to a crash if the thread pointer was still uninitialized, and otherwise would just cause the canary to be zero (less secure).
2012-05-03overhaul SSP support to use a real canaryRich Felker-4/+13
pthread structure has been adjusted to match the glibc/GCC abi for where the canary is stored on i386 and x86_64. it will need variants for other archs to provide the added security of the canary's entropy, but even without that it still works as well as the old "minimal" ssp support. eventually such changes will be made anyway, since they are also needed for GCC/C11 thread-local storage support (not yet implemented). care is taken not to attempt initializing the thread pointer unless the program actually uses SSP (by reference to __stack_chk_fail).
2012-04-24first attempt at enabling stack protector supportRich Felker-0/+14
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.