Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1535352

Re: [PATCH v2] lkdtm: Add tests for LIST_POISON and ZERO_SIZE_PTR

From Greg KH <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] lkdtm: Add tests for LIST_POISON and ZERO_SIZE_PTR
Date 2016-12-03 10:20 +0100
Message-ID <sKeEa-7HT-15@gated-at.bofh.it> (permalink)
References <sJNDX-739-5@gated-at.bofh.it> <sK3IJ-Js-1@gated-at.bofh.it> <sKeEa-7HT-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Dec 03, 2016 at 10:10:57AM +0100, Greg KH wrote:
> On Fri, Dec 02, 2016 at 01:32:24PM -0800, Kees Cook wrote:
> > On Thu, Dec 1, 2016 at 8:22 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> > > This adds two tests, to check that a read or write to LIST_POISON1 and
> > > ZERO_SIZE_PTR are blocked.
> > >
> > > The default values for both (256 and 16) typically fall in the range
> > > of valid user space addresses. However in general mmap_min_addr is 64K,
> > > which prevents user space from mapping anything at those addresses.
> > >
> > > However it's feasible that an attacker will be able to find a way to
> > > cause an access at an offset from either value, and if that offset is
> > > greater than 64K then they can access user space again.
> > >
> > > To simulate that case, in the test we create a user mapping at
> > > approximately mmap_min_addr, and offset the pointer by that amount. This
> > > gives the test the greatest chance of failing (ie. an access
> > > succeeding). We don't actually use mmap_min_addr, because that would
> > > require exporting it to modules, instead we use the default value at
> > > compile time as a reasonable approximation.
> > >
> > > Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> > 
> > Thanks for this! I like it. :)
> > 
> > Acked-by: Kees Cook <keescook@chromium.org>
> > 
> > Greg, can you take this into your tree?
> 
> Sure, will do so on Monday.

Oops, no, I will not, kbuild reports build errors with it :(

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] lkdtm: Add tests for LIST_POISON and ZERO_SIZE_PTR Michael Ellerman <mpe@ellerman.id.au> - 2016-12-02 05:30 +0100
  Re: [PATCH v2] lkdtm: Add tests for LIST_POISON and ZERO_SIZE_PTR Kees Cook <keescook@chromium.org> - 2016-12-02 22:40 +0100
    Re: [PATCH v2] lkdtm: Add tests for LIST_POISON and ZERO_SIZE_PTR Greg KH <gregkh@linuxfoundation.org> - 2016-12-03 10:20 +0100
    Re: [PATCH v2] lkdtm: Add tests for LIST_POISON and ZERO_SIZE_PTR Greg KH <gregkh@linuxfoundation.org> - 2016-12-03 10:20 +0100

csiph-web