Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Paul Pluzhnikov <ppluzhnikov@google.com>
Cc: gdb-patches@sourceware.org, Pedro Alves <pedro@codesourcery.com>,
		Ulrich Weigand <uweigand@de.ibm.com>
Subject: Re: RFC: Longjmp vs LD_POINTER_GUARD revisited
Date: Sun, 15 Nov 2009 22:36:00 -0000	[thread overview]
Message-ID: <20091115223539.GA23336@caradoc.them.org> (raw)
In-Reply-To: <8ac60eac0911151029i60ae1713m8ee2de5c05103d9d@mail.gmail.com>

On Sun, Nov 15, 2009 at 10:29:33AM -0800, Paul Pluzhnikov wrote:
> 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).

There's a rotate and an xor involved; I don't believe this would work
as written... sure, we could "discover" it from disassembling key
functions automatically...

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2009-11-15 22:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-15 17:35 Daniel Jacobowitz
2009-11-15 18:06 ` Eli Zaretskii
2009-11-15 18:30 ` Paul Pluzhnikov
2009-11-15 22:36   ` Daniel Jacobowitz [this message]
2009-11-15 23:06     ` Paul Pluzhnikov
2009-11-16 14:37       ` Daniel Jacobowitz
2009-11-16 14:55         ` Pedro Alves
2009-11-16 14:56           ` Pedro Alves
2009-11-16 15:05           ` Pedro Alves
2009-11-16 17:50           ` Daniel Jacobowitz
2009-11-15 18:39 ` Joseph S. Myers
2009-11-15 21:52   ` Mark Kettenis
2009-11-15 22:37     ` Daniel Jacobowitz
2009-11-16 15:15     ` Frank Ch. Eigler
2009-11-16 15:40       ` Paul Pluzhnikov
2009-11-16 15:43         ` Paul Pluzhnikov
2009-11-16 16:19         ` Mark Kettenis
2009-11-16 15:59       ` Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091115223539.GA23336@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    --cc=ppluzhnikov@google.com \
    --cc=uweigand@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox