public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andi Kleen <andi@firstfloor.org>,
	James Morris <jmorris@namei.org>,
	James Carter <jwcart2@tycho.nsa.gov>,
	Eric Paris <eparis@redhat.com>,
	linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov,
	Stephen Smalley <sds@tycho.nsa.gov>,
	spender@grsecurity.net, Daniel J Walsh <dwalsh@redhat.com>,
	cl@linux-foundation.org, Arjan van de Ven <arjan@infradead.org>,
	kees@outflux.net, Chad Sellers <csellers@tresys.com>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	mingo@elte.hu
Subject: Re: mmap_min_addr and your local LSM (ok, just SELinux)
Date: Tue, 28 Jul 2009 13:21:37 +0200	[thread overview]
Message-ID: <20090728112137.GF15310@basil.fritz.box> (raw)
In-Reply-To: <20090728110028.31fa9a6f@lxorguk.ukuu.org.uk>

On Tue, Jul 28, 2009 at 11:00:28AM +0100, Alan Cox wrote:
> On Tue, 28 Jul 2009 11:21:29 +0200
> Andi Kleen <andi@firstfloor.org> wrote:
> 
> > Alan Cox <alan@lxorguk.ukuu.org.uk> writes:
> > 
> > > A dumb question perhaps, but while addling my brain over the tty layer I
> > > was wondering if for the specific case of jump through NULL (which seems
> > > to be the most common but by no means only problem case that gets
> > > exploited) is there any reason we can't set a default breakpoint for
> > 
> > You mean a hardware breakpoint? Hardware break points are a precious
> > scarce resource. The people who rely on them would be likely
> > unhappy if you take one way from them.
> 
> They are a tiny minority and could always turn such protection off.

"I don't use it so I don't care"

... in addition it doesn't help anyways because the x86 hardware
breakpoints can only trap an upto 4-8 bytes area. So if you set that
to 0 then a reference to >8(%reg),%reg==0 wouldn't trap.

That's a pretty common case with

	x->member

where offsetof(..,, member) >= 8 (or 4 on 32bit)

Was very likely even the case on the original exploit.

If you use all available break points (making all gdb users unhappy)
then you could still only cover 64 bytes on 64bit, 32 on 32bit.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

  reply	other threads:[~2009-07-28 11:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-20 23:23 mmap_min_addr and your local LSM (ok, just SELinux) Eric Paris
2009-07-21  0:14 ` Christopher Pardy
2009-07-21 13:41   ` Daniel J Walsh
2009-07-21  3:45 ` James Morris
2009-07-21 14:44   ` James Carter
2009-07-22 10:06     ` James Morris
2009-07-28  0:19       ` Alan Cox
2009-07-28  3:28         ` Kyle Moffett
2009-07-28  9:21         ` Andi Kleen
2009-07-28 10:00           ` Alan Cox
2009-07-28 11:21             ` Andi Kleen [this message]
2009-07-28 13:35               ` Brad Spengler
2009-07-28 14:48                 ` Andi Kleen
2009-07-28 15:56           ` Kees Cook
2009-07-28 16:23             ` Andi Kleen
2009-07-21  3:48 ` Arjan van de Ven
2009-07-21 11:51   ` Brad Spengler
2009-07-21  4:13 ` Kyle McMartin
2009-07-21 11:31   ` Arnd Bergmann
2009-07-30  9:06 ` Pavel Machek

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=20090728112137.GF15310@basil.fritz.box \
    --to=andi@firstfloor.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arjan@infradead.org \
    --cc=cl@linux-foundation.org \
    --cc=csellers@tresys.com \
    --cc=dwalsh@redhat.com \
    --cc=eparis@redhat.com \
    --cc=jmorris@namei.org \
    --cc=jwcart2@tycho.nsa.gov \
    --cc=kees@outflux.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=spender@grsecurity.net \
    /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