glibc/sysdeps/posix
H.J. Lu ed421fca42 Avoid backtrace from __stack_chk_fail [BZ #12189]
__stack_chk_fail is called on corrupted stack.  Stack backtrace is very
unreliable against corrupted stack.  __libc_message is changed to accept
enum __libc_message_action and call BEFORE_ABORT only if action includes
do_backtrace.  __fortify_fail_abort is added to avoid backtrace from
__stack_chk_fail.

	[BZ #12189]
	* debug/Makefile (CFLAGS-tst-ssp-1.c): New.
	(tests): Add tst-ssp-1 if -fstack-protector works.
	* debug/fortify_fail.c: Include <stdbool.h>.
	(_fortify_fail_abort): New function.
	(__fortify_fail): Call _fortify_fail_abort.
	(__fortify_fail_abort): Add a hidden definition.
	* debug/stack_chk_fail.c: Include <stdbool.h>.
	(__stack_chk_fail): Call __fortify_fail_abort, instead of
	__fortify_fail.
	* debug/tst-ssp-1.c: New file.
	* include/stdio.h (__libc_message_action): New enum.
	(__libc_message): Replace int with enum __libc_message_action.
	(__fortify_fail_abort): New hidden prototype.
	* malloc/malloc.c (malloc_printerr): Update __libc_message calls.
	* sysdeps/posix/libc_fatal.c (__libc_message): Replace int
	with enum __libc_message_action.  Call BEFORE_ABORT only if
	action includes do_backtrace.
	(__libc_fatal): Update __libc_message call.
2017-07-11 07:44:14 -07:00
..
alarm.c
clock_getres.c
clock.c
closedir.c
ctermid.c
cuserid.c
dirfd.c
dirstream.h
dl-fileid.h
dup2.c
dup.c
euidaccess.c
fdopendir.c
flock.c
fpathconf.c
gai_strerror-strs.h
gai_strerror.c
getaddrinfo.c resolv: Introduce struct resolv_context [BZ #21668] 2017-07-03 20:52:59 +02:00
getcwd.c Assume that O_CLOEXEC is always defined and works 2017-04-18 14:56:51 +02:00
getdtsz.c
gethostname.c Clean pthread functions namespaces for C11 threads 2017-06-23 17:38:17 -03:00
getpagesize.c
gettimeofday.c
isatty.c
isfdtype.c
killpg.c
libc_fatal.c Avoid backtrace from __stack_chk_fail [BZ #12189] 2017-07-11 07:44:14 -07:00
Makefile
mkfifo.c
mkfifoat.c
nice.c
open64.c
opendir.c Assume that O_CLOEXEC is always defined and works 2017-04-18 14:56:51 +02:00
pathconf.c
pause.c
posix_fallocate64.c
posix_fallocate.c
pread64.c
pread.c
preadv2.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
preadv64.c posix: Fix and simplify default p{read,write}v implementation 2017-05-15 16:33:45 -03:00
preadv64v2.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
preadv_common.c posix: Fix and simplify default p{read,write}v implementation 2017-05-15 16:33:45 -03:00
preadv.c posix: Fix and simplify default p{read,write}v implementation 2017-05-15 16:33:45 -03:00
profil.c Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
pwrite64.c
pwrite.c
pwritev2.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
pwritev64.c posix: Fix and simplify default p{read,write}v implementation 2017-05-15 16:33:45 -03:00
pwritev64v2.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
pwritev_common.c posix: Fix and simplify default p{read,write}v implementation 2017-05-15 16:33:45 -03:00
pwritev.c posix: Fix and simplify default p{read,write}v implementation 2017-05-15 16:33:45 -03:00
raise.c
readdir_r.c
readdir.c
readv.c
remove.c
rename.c
rewinddir.c
seekdir.c
shm_open.c Assume that O_CLOEXEC is always defined and works 2017-04-18 14:56:51 +02:00
shm_unlink.c
shm-directory.c
shm-directory.h
sigblock.c
sigignore.c Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
sigintr.c Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
signal.c Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
sigpause.c
sigset.c Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
sigsetmask.c
sigsuspend.c
sigwait.c
sleep.c
spawni.c posix: Fix default posix_spawn return value 2017-07-05 15:58:31 -03:00
sprofil.c Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
Subdirs
sysconf.c timezone: Remove TZNAME_MAX limit from sysconf [BZ #15576] 2017-03-07 17:45:38 +01:00
system.c
sysv_signal.c Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
telldir.c
tempname.c
time.c
timespec_get.c
truncate.c
ttyname_r.c
ttyname.c
ulimit.c
usleep.c
utime.c
utimes.c
wait3.c
wait.c
waitid.c
writev.c