[Bug libc/21752] __stack_chk_fail should do as little work as possible
cvs-commit at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Wed Jul 19 18:12:00 GMT 2017
https://sourceware.org/bugzilla/show_bug.cgi?id=21752
--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/pr21752/master has been created
at d8a801c2eadd6a0286434a49fafdc6c8ef2e1556 (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d8a801c2eadd6a0286434a49fafdc6c8ef2e1556
commit d8a801c2eadd6a0286434a49fafdc6c8ef2e1556
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jul 19 10:56:19 2017 -0700
Avoid accessing corrupted stack from __stack_chk_fail [BZ #21752]
__libc_argv[0] points to address on stack and __libc_secure_getenv
accesses environment variables which are on stack. We should avoid
accessing stack when stack is corrupted.
This patch also renames function argument in __fortify_fail_abort
from do_backtrace to need_backtrace to avoid confusion with do_backtrace
from enum __libc_message_action.
[BZ #21752]
* debug/fortify_fail.c (__fortify_fail_abort): Don't pass down
__libc_argv[0] if we aren't doing backtrace. Rename do_backtrace
to need_backtrace.
* sysdeps/posix/libc_fatal.c (__libc_message): Don't call
__libc_secure_getenv if we aren't doing backtrace.
-----------------------------------------------------------------------
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list