Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 24 Apr 2017 21:11:20 -0400
From: Rik van Riel <riel@...hat.com>
To: Kees Cook <keescook@...omium.org>, Peter Zijlstra <peterz@...radead.org>
Cc: PaX Team <pageexec@...email.hu>, LKML <linux-kernel@...r.kernel.org>, 
 Eric Biggers <ebiggers3@...il.com>, Christoph Hellwig <hch@...radead.org>,
 "axboe@...nel.dk" <axboe@...nel.dk>,  James Bottomley
 <James.Bottomley@...senpartnership.com>, Elena Reshetova
 <elena.reshetova@...el.com>, Hans Liljestrand <ishkamiel@...il.com>, David
 Windsor <dwindsor@...il.com>, "x86@...nel.org" <x86@...nel.org>,  Ingo
 Molnar <mingo@...nel.org>, Arnd Bergmann <arnd@...db.de>, Greg
 Kroah-Hartman <gregkh@...uxfoundation.org>, Jann Horn <jann@...jh.net>,
 "David S. Miller" <davem@...emloft.net>, linux-arch
 <linux-arch@...r.kernel.org>,  "kernel-hardening@...ts.openwall.com"
 <kernel-hardening@...ts.openwall.com>
Subject: Re: Re: [PATCH] x86/refcount: Implement fast
 refcount_t handling

On Mon, 2017-04-24 at 15:37 -0700, Kees Cook wrote:
> On Mon, Apr 24, 2017 at 3:01 PM, Peter Zijlstra <peterz@...radead.org
> > wrote:
> > On Mon, Apr 24, 2017 at 01:40:56PM -0700, Kees Cook wrote:
> > > I think we're way off in the weeds here. The "cannot inc from 0"
> > > check
> > > is about general sanity checks on refcounts.
> > 
> > I disagree, although sanity check are good too.
> > 
> > > It should never happen, and if it does, there's a bug.
> > 
> > The very same is true of the overflow thing.
> > 
> > > However, what the refcount hardening protection is trying to do
> > > is
> > > protect again the exploitable condition: overflow.
> > 
> > Sure..
> > 
> > > Inc-from-0 isn't an exploitable condition since in theory
> > > the memory suddenly becomes correctly managed again.
> > 
> > It does not. It just got free'ed. Nothing will stop the free from
> > happening (or already having happened).
> 
> Well, yes, but that's kind of my point. Detecting inc-from-0 is "too
> late" to offer a protection. It offers notification of a bug, rather
> than stopping an exploit from happening.

inc-from-0 could allow the attacker to gain access to
an object which gets allocated to a new user afterwards.

Certainly much less useful as an exploit, but still a
potential privilege escalation.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.