All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yves-Alexis Perez <corsac@debian.org>
To: kernel-hardening@lists.openwall.com, Kees Cook <keescook@chromium.org>
Cc: David Windsor <dave@progbits.org>
Subject: Re: [kernel-hardening][RFC PATCH v2 00/12] Add PAX_REFCOUNT overflow protection
Date: Thu, 21 Jan 2016 13:45:19 +0100	[thread overview]
Message-ID: <1453380319.4133.8.camel@debian.org> (raw)
In-Reply-To: <1453338072.4942.16.camel@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

On mer., 2016-01-20 at 20:01 -0500, Daniel Micay wrote:
> It could do some fine-grained randomization. It does have a measurable
> performance cost since it makes allocations colder and there isn't much
> room for adding entropy but it does add up over time. Depending on the
> locking design it could also hurt there too.
> 
> Take a look at OpenBSD malloc if you're interested in it. It has a few
> forms of randomization and they do add 

I also checked in the PaX patch to see if there was something done to harden
slab, and while it's not randomisation, there's some hardening done as part of
PAX_USERCOPY (heap hardening for copy_{from,to}_user stuff).

The patch adds a GFP_USERCOPY/SLAB_USERCOPY flag for allocation, and then use
it for “tagging” allocations of pages which will end up in a
copy_{from,to}_user() call (as far as I can tell, it's a manual approach). The
tagged allocations are then using a separate slab cache from the kernel
itself, so it shouldn't be possible to exploit an UAF: the memory originating
from userland would not be dereferenced as a kernel allocation.

4.5 kernel will apparently include a SLAB_ACCOUNT flag which is use from
accounting. I wonder if it'd be possible to also use it to tag and isolate
memory allocated from different privilege levels.

Regards,
-- 
Yves-Alexis


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

      reply	other threads:[~2016-01-21 12:45 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-17 14:57 [kernel-hardening][RFC PATCH v2 00/12] Add PAX_REFCOUNT overflow protection David Windsor
2015-12-17 14:57 ` [kernel-hardening][RFC PATCH v2 01/12] x86: add PAX_REFCOUNT support David Windsor
2015-12-17 17:16   ` Greg KH
2015-12-17 17:55     ` David Windsor
2015-12-17 18:11       ` Greg KH
2015-12-17 18:23         ` David Windsor
2015-12-17 19:46           ` Greg KH
2015-12-18  2:59         ` David Windsor
2015-12-17 14:57 ` [kernel-hardening][RFC PATCH v2 02/12] percpu_ref: decrease per-CPU refcount bias David Windsor
2015-12-17 20:56   ` Kees Cook
2015-12-17 14:57 ` [kernel-hardening][RFC PATCH v2 03/12] kernel: opt out of PAX_REFCOUNT protection David Windsor
2015-12-17 14:57 ` [kernel-hardening][RFC PATCH v2 04/12] mm: " David Windsor
2015-12-17 14:57 ` [kernel-hardening][RFC PATCH v2 05/12] fs: " David Windsor
2015-12-17 14:57 ` [kernel-hardening][RFC PATCH v2 06/12] net: " David Windsor
2015-12-17 14:57 ` [kernel-hardening][RFC PATCH v2 07/12] security: " David Windsor
2015-12-17 14:57 ` [kernel-hardening][RFC PATCH v2 08/12] drivers: opt out of PAX_REFCOUNT protection (1 of 2) David Windsor
2015-12-17 14:57 ` [kernel-hardening][RFC PATCH v2 09/12] drivers: opt out of PAX_REFCOUNT protection (2 " David Windsor
2015-12-17 14:57 ` [kernel-hardening][RFC PATCH v2 10/12] pax: opt out of PAX_REFCOUNT protection David Windsor
2015-12-17 14:57 ` [kernel-hardening][RFC PATCH v2 11/12] security: add Kconfig options for PAX_REFCOUNT David Windsor
2015-12-17 20:53   ` Kees Cook
2015-12-17 14:57 ` [kernel-hardening][RFC PATCH v2 12/12] lkdtm: add test for atomic_t underflow/overflow David Windsor
2015-12-17 20:55 ` [kernel-hardening][RFC PATCH v2 00/12] Add PAX_REFCOUNT overflow protection Kees Cook
2016-01-19 19:07   ` Kees Cook
2016-01-20 13:11     ` David Windsor
2016-02-02 11:33       ` David Windsor
2016-02-04 18:19         ` Kees Cook
2016-04-21 20:37           ` Kees Cook
2016-04-28 12:16             ` [kernel-hardening][RFC PATCH 0/5] " David Windsor
2016-01-20 20:57     ` [kernel-hardening][RFC PATCH v2 00/12] " Yves-Alexis Perez
2016-01-20 23:39       ` Kees Cook
2016-01-21  1:01       ` Daniel Micay
2016-01-21 12:45         ` Yves-Alexis Perez [this message]

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=1453380319.4133.8.camel@debian.org \
    --to=corsac@debian.org \
    --cc=dave@progbits.org \
    --cc=keescook@chromium.org \
    --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.