This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/21752] __stack_chk_fail should do as little work as possible


https://sourceware.org/bugzilla/show_bug.cgi?id=21752

--- Comment #8 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, master has been updated
       via  422ff87c249ddc06701d096421db63343e4754be (commit)
      from  55703fcace89b53d7f41f7d85ede50571da2bcc8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=422ff87c249ddc06701d096421db63343e4754be

commit 422ff87c249ddc06701d096421db63343e4754be
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Jul 24 06:06:08 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.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                  |    9 +++++++++
 debug/fortify_fail.c       |   12 ++++++++----
 sysdeps/posix/libc_fatal.c |   15 ++++++++++-----
 3 files changed, 27 insertions(+), 9 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]