This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: Longjmp vs LD_POINTER_GUARD revisited
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: gdb-patches at sourceware dot org, Pedro Alves <pedro at codesourcery dot com>, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Sun, 15 Nov 2009 10:29:33 -0800
- Subject: Re: RFC: Longjmp vs LD_POINTER_GUARD revisited
- References: <20091115173429.GB23483@caradoc.them.org>
On Sun, Nov 15, 2009 at 9:34 AM, Daniel Jacobowitz <drow@false.org> wrote:
> * Where the jmp_buf contents are obfuscated, as done by glibc, which
> "encrypts" them using a canary stored in the thread TCB.
FWIW, I never understood the point of this obfuscation: the program
(and any rogue code injected into it) can trivially discover the value
of canary:
call sigsetjmp
a_label:
... canary = sigjmp_buf.__jmpbuf[JB_PC] - &a_label
I think GDB could also perform such discovery, and that would allow it
work with non-debug glibc (debug glibc (I believe) is exception rather
the rule outside of {gdb,glibc,gcc} developers).
--
Paul Pluzhnikov