This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/21752] __stack_chk_fail should do as little work as possible
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 21 Jul 2017 12:37:14 +0000
- Subject: [Bug libc/21752] __stack_chk_fail should do as little work as possible
- Auto-submitted: auto-generated
- References: <bug-21752-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21752
--- Comment #3 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/pie/static has been created
at 0f02858db802520c3061bd06bb1d12b13f61e1bc (commit)
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0f02858db802520c3061bd06bb1d12b13f61e1bc
commit 0f02858db802520c3061bd06bb1d12b13f61e1bc
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jul 19 16:53:06 2017 -0700
tunables: Use direct syscall for access (BZ#21744)
The function maybe_enable_malloc_check, which is called by
__tunables_init, calls __access_noerrno. It isn't problem when
symbol is is in ld.so, which has a special version of __access_noerrno
without stack protector. But when glibc is built with stack protector,
maybe_enable_malloc_check in libc.a can't call the regular version of
__access_noerrno with stack protector.
This patch changes how Linux defines the __access_noerrno to be an
inline call instead and thus preventing defining different build
rules for ld/static and shared.
H.J. Lu <hongjiu.lu@intel.com>
Adhemerval Zanella <adhemerval.zanella@linaro.org>
* elf/dl-tunables.c: Include not-errno.h header.
* include/unistd.h (__access_noerrno): Remove definition.
* sysdeps/unix/sysv/linux/access.c (__access_noerrno): Likewise.
* sysdeps/generic/not-errno.h: New file.
* sysdeps/unix/sysv/linux/not-errno.h: Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9a5bf409e24904320606cb5c678c67deae2936de
commit 9a5bf409e24904320606cb5c678c67deae2936de
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jul 19 14:32:42 2017 -0700
Add _startup_sbrk and _startup_fatal
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3fd64feae4525f6e0e16f28c3f6d2e257d625f8d
commit 3fd64feae4525f6e0e16f28c3f6d2e257d625f8d
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jul 19 12:04:14 2017 -0700
Don't compile tst-prelink.c with PIE for GLOB_DAT relocation
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=be71d5eb1f7257b7f6aedb774ea93d28ac03d26a
commit be71d5eb1f7257b7f6aedb774ea93d28ac03d26a
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jul 19 09:32:45 2017 -0700
i386: Define I386_USE_SYSENTER to 0 or 1 and check PIC
Define I386_USE_SYSENTER to 0 or 1 so that special versions of syscalls
with "int $0x80" can be provided for static PIE during start up. Also
check PIC instead SHARED for PIC version of syscall macros.
* sysdeps/unix/sysv/linux/i386/sysdep.h (I386_USE_SYSENTER):
Define to I386_USE_SYSENTER to 0 or 1 if not defined.
(ENTER_KERNEL): Check if I386_USE_SYSENTER is 1 and check PIC.
(INTERNAL_SYSCALL_MAIN_INLINE): Likewise.
(INTERNAL_SYSCALL_NCS): Likewise.
(LOADARGS_1): Likewise.
(LOADARGS_5): Likewise.
(RESTOREARGS_1): Likewise.
(RESTOREARGS_5): Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5ec0c780e6fc46330e1b44386c2cc60a5710d24c
commit 5ec0c780e6fc46330e1b44386c2cc60a5710d24c
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 18 15:46:40 2017 -0700
i386: Check PIC in i386 multiarch functions
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3a039d23472e303ae2a7a1c66a194a47ae60bb94
commit 3a039d23472e303ae2a7a1c66a194a47ae60bb94
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 18 15:45:46 2017 -0700
i386: Check PIC instead of SHARED in start.S
Support static PIE. Avoid relocation in static PIE since _start is
called before it is relocated.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6ab45e1aca60cbf23e5e2921988f138cc81bfabf
commit 6ab45e1aca60cbf23e5e2921988f138cc81bfabf
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 18 10:42:48 2017 -0700
Use hidden visibility for HAVE_STATIC_PIE
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0bda3d02c31a96fd3cfc71b9e7cc7333e66f61ac
commit 0bda3d02c31a96fd3cfc71b9e7cc7333e66f61ac
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jul 17 13:53:52 2017 -0700
Add _dl_relocate_static_pie
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0ea66ca2027e80e11d153fb01c084c4ca3ccc9c2
commit 0ea66ca2027e80e11d153fb01c084c4ca3ccc9c2
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jul 17 08:54:40 2017 -0700
Define pie-default/default-pie-ldflag for --enable-static-pie
1. Add $(pie-default) to CFLAGS-.o and CFLAGS-.op.
2. Add $(default-pie-ldflag) to +link-static-before-libc.
3. Define +prectorT/+postctorT to $(+prectorS)/$(+postctorS).
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8ecb9aaef56edb7c79c40730dc37c67cb9c66db9
commit 8ecb9aaef56edb7c79c40730dc37c67cb9c66db9
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 18 05:58:21 2017 -0700
x86-64: Check if linker supports static PIE
Need the linker with fix for:
https://sourceware.org/bugzilla/show_bug.cgi?id=21782
Binutils 2.29 is OK.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f2bd369a9363375e8df004ca7a13922f76556c72
commit f2bd369a9363375e8df004ca7a13922f76556c72
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jul 17 08:36:45 2017 -0700
Add --enable-static-pie
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5b4dfb9356916772a3952b3f33f967eaed9f124f
commit 5b4dfb9356916772a3952b3f33f967eaed9f124f
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jul 17 08:17:32 2017 -0700
Check if linker supports --no-dynamic-linker
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c654c40f309a8898d58dbbde7db2d30da67ab211
commit c654c40f309a8898d58dbbde7db2d30da67ab211
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 18 05:23:21 2017 -0700
x86-64: Check PIC instead of SHARED in start.S
PIC may be the default.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6f4b694b57d342afad6633f16f0dc220a34fc4cd
commit 6f4b694b57d342afad6633f16f0dc220a34fc4cd
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 18 15:36:20 2017 -0700
x86: Remove assembly versions of HAS_CPU_FEATURE/HAS_ARCH_FEATURE
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=12e5220a24f400e2d0ecafa26232a0b5ef1fa713
commit 12e5220a24f400e2d0ecafa26232a0b5ef1fa713
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jul 19 06:54:03 2017 -0700
i386: Convert IFUNC selectors to C
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0137bd1e0071e0b2cc0e1e5c89a2b794d23f4cd1
commit 0137bd1e0071e0b2cc0e1e5c89a2b794d23f4cd1
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 18 15:35:30 2017 -0700
x86-64: Convert libmathvec IFUNC selectors to C
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0b16f5a29c0d18eb4d605553debe12e2d2f60cf7
commit 0b16f5a29c0d18eb4d605553debe12e2d2f60cf7
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Jul 18 13:56:17 2017 -0700
x86-64: Convert libm IFUNC selectors to C
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7df10c753ecddbabcb88d335b7e007fe8ef97c22
commit 7df10c753ecddbabcb88d335b7e007fe8ef97c22
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jul 19 08:46:08 2017 -0700
i386: Don't define multiarch __memmove_chk in libc.a [BZ #21791]
There is no need to define multiarch __memmove_chk in libc.a.
[BZ #21791]
* sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S
(MEMCPY_CHK): Define only if SHARED is defined.
* sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S (MEMCPY_CHK):
Likewise.
* sysdeps/i386/i686/multiarch/memcpy-ssse3.S (MEMCPY_CHK):
Likewise.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2acd6442f590283116bd77555c38bd75b9747f77
commit 2acd6442f590283116bd77555c38bd75b9747f77
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.