All of lore.kernel.org
 help / color / mirror / Atom feed
From: lazytyped <lazytyped@gmail.com>
To: kernel-hardening@lists.openwall.com
Subject: Re: [kernel-hardening] [RFC v2] mm: SLAB freelist randomization
Date: Sat, 9 Apr 2016 07:08:30 -0700	[thread overview]
Message-ID: <57090CDE.6080509@gmail.com> (raw)
In-Reply-To: <1460138602-85386-1-git-send-email-thgarnie@google.com>



On 4/8/16 11:03 AM, Thomas Garnier wrote:
> For example this attack against SLUB (also applicable against SLAB)
> would be affected:
> https://jon.oberheide.org/blog/2010/09/10/linux-kernel-can-slub-overflow/

would it?

- allocate a ton of shmid_kernel until you get a fresh page
- free one of such objects (here is where your randomization comes into
play)
- allocate the "vulnerable" object
- trigger the overflow
- start "freeing" the others - one will work

This doesn't work only in the case in which you are the last object in
the SLUB. So what you are achieving is a 1/(pagesize/sizeof_objects)
chance of making the attack less reliable. But I can free yet another
object and retry, if the previous overflow didn't kill me (simplest way
to guarantee that is to not completely fill the newly allocated SLUB page).


       -   twiz

  reply	other threads:[~2016-04-09 14:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-08 18:03 [kernel-hardening] [RFC v2] mm: SLAB freelist randomization Thomas Garnier
2016-04-08 18:03 ` Thomas Garnier
2016-04-08 18:03 ` Thomas Garnier
2016-04-09 14:08 ` lazytyped [this message]
2016-04-09 14:24   ` [kernel-hardening] " Thomas Garnier
2016-04-09 14:42     ` lazytyped
2016-04-09 15:31       ` Thomas Garnier
2016-04-11 19:08   ` Kees Cook

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=57090CDE.6080509@gmail.com \
    --to=lazytyped@gmail.com \
    --cc=kernel-hardening@lists.openwall.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.