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: "hjl.tools at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 19 Jul 2017 17:31:30 +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
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl.tools at gmail dot com
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
On i686, I got
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program:
/export/build/gnu/glibc-32bit/build-i686-linux/debug/tst-ssp-1 --direct
Program received signal SIGSEGV, Segmentation fault.
__GI_getenv (name=0xf7f8f054 "BC_FATAL_STDERR_") at getenv.c:84
84 if (name_start == ep_start && !strncmp (*ep + 2, name, len)
(gdb) bt
#0 __GI_getenv (name=0xf7f8f054 "BC_FATAL_STDERR_") at getenv.c:84
#1 0xf7e38fab in __GI___libc_secure_getenv (
name=name@entry=0xf7f8f052 "LIBC_FATAL_STDERR_") at secure-getenv.c:29
#2 0xf7e7aa3b in __libc_message (action=action@entry=do_abort,
fmt=fmt@entry=0xf7f90a5e "*** %s ***: %s terminated\n")
at ../sysdeps/posix/libc_fatal.c:80
#3 0xf7f1b225 in __GI___fortify_fail_abort (
do_backtrace=do_backtrace@entry=false,
msg=0xf7f90a46 "stack smashing detected") at fortify_fail.c:31
#4 0xf7f1b1da in __stack_chk_fail () at stack_chk_fail.c:29
#5 0x08049023 in do_test () at tst-ssp-1.c:42
#6 0x2a2a2a2a in ?? ()
#7 0x2a2a2a2a in ?? ()
#8 0x2a2a2a2a in ?? ()
#9 0x2a2a2a2a in ?? ()
#10 0x2a2a2a2a in ?? ()
#11 0x2a2a2a2a in ?? ()
#12 0x2a2a2a2a in ?? ()
#13 0x2a2a2a2a in ?? ()
#14 0x2a2a2a2a in ?? ()
#15 0x2a2a2a2a in ?? ()
#16 0x2a2a2a2a in ?? ()
...
0xf7e38738 <+168>: je 0xf7e386fc <__GI_getenv+108>
=> 0xf7e3873a <+170>: movzwl (%ebx),%eax
...
(gdb) p/x $ebx
$3 = 0x2a2a2a2a
(gdb)
We are using garbage from stack.
--
You are receiving this mail because:
You are on the CC list for the bug.