LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Igor Stoppa <igor.stoppa@gmail.com>
Cc: mhocko@kernel.org, akpm@linux-foundation.org,
	keescook@chromium.org, linux-mm@kvack.org,
	kernel-hardening@lists.openwall.com,
	linux-security-module@vger.kernel.org, labbott@redhat.com,
	linux-kernel@vger.kernel.org, igor.stoppa@huawei.com
Subject: Re: [PATCH 0/3] linux-next: mm: hardening: Track genalloc allocations
Date: Sat, 28 Apr 2018 20:09:40 -0700	[thread overview]
Message-ID: <20180429030940.GA2541@bombadil.infradead.org> (raw)
In-Reply-To: <20180429024542.19475-1-igor.stoppa@huawei.com>

On Sun, Apr 29, 2018 at 06:45:39AM +0400, Igor Stoppa wrote:
> This patchset was created as part of an older version of pmalloc, however
> it has value per-se, as it hardens the memory management for the generic
> allocator genalloc.
> 
> Genalloc does not currently track the size of the allocations it hands out.
> 
> Either by mistake, or due to an attack, it is possible that more memory
> than what was initially allocated is freed, leaving behind dangling
> pointers, ready for an use-after-free attack.

This is a good point.  It is worth hardening genalloc.
But I still don't like the cost of the bitmap.  I've been
reading about allocators and I found Bonwick's paper from 2001:
https://www.usenix.org/legacy/event/usenix01/full_papers/bonwick/bonwick.pdf
Section 4 describes the vmem allocator which would seem to have superior
performance and lower memory overhead than the current genalloc allocator,
never mind the hardened allocator.

Maybe there's been an advnace in resource allocator technology since
then that someone more familiar with CS research can point out.

  parent reply	other threads:[~2018-04-29  3:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-29  2:45 Igor Stoppa
2018-04-29  2:45 ` [PATCH 1/3] genalloc: track beginning of allocations Igor Stoppa
2018-04-29  2:45 ` [PATCH 2/3] Add label and license to genalloc.rst Igor Stoppa
2018-04-29  2:45 ` [PATCH 3/3] genalloc: selftest Igor Stoppa
2018-04-29  3:36   ` Randy Dunlap
2018-04-29 22:39     ` Igor Stoppa
2018-04-30  2:14   ` kbuild test robot
2018-04-30  4:04   ` kbuild test robot
2018-04-29  3:09 ` Matthew Wilcox [this message]
2018-04-29 16:39   ` [PATCH 0/3] linux-next: mm: hardening: Track genalloc allocations Igor Stoppa
2018-04-29 16:41     ` Igor Stoppa

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=20180429030940.GA2541@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=igor.stoppa@gmail.com \
    --cc=igor.stoppa@huawei.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=labbott@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --subject='Re: [PATCH 0/3] linux-next: mm: hardening: Track genalloc allocations' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).