linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Topi Miettinen <toiwoton@gmail.com>
Cc: Cristiano Giuffrida <c.giuffrida@vu.nl>,
	Mike Rapoport <rppt@kernel.org>,
	"linux-hardening@vger.kernel.org"
	<linux-hardening@vger.kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jann Horn <jannh@google.com>, Kees Cook <keescook@chromium.org>,
	Uladzislau Rezki <urezki@gmail.com>
Subject: Re: [PATCH v4] mm: Optional full ASLR for mmap() and mremap()
Date: Fri, 20 Nov 2020 15:27:16 +0000	[thread overview]
Message-ID: <20201120152716.GA4327@casper.infradead.org> (raw)
In-Reply-To: <74fd6d3b-936f-94f5-c183-a2e6bc7a9e35@gmail.com>

On Fri, Nov 20, 2020 at 10:38:21AM +0200, Topi Miettinen wrote:
> On 20.11.2020 0.20, Cristiano Giuffrida wrote:
> > Indeed it's nontrivial to get similar randomization guarantees for the
> > kernel. I mentioned TagBleed because similar combined AnC + TLB
> > attacks should also be possible in the browser. We just happened to
> > focus on the kernel with TagBleed.
> 
> Perhaps kernel objects could be also compiled as relocatable shared objects,
> like shared libraries for user applications, so that a they could be
> relocated independently away from the base address of main kernel. Also
> compiling the kernel with -mcmodel=large could allow various segments (code,
> rodata, data) to be located more freely. These would make the attacker to do
> more probing. Again, pointers between the objects may make these less
> useful.

They are relocatable shared objects.  They're loaded into the vmalloc
area on some architectures but x86 has a special MODULES_VADDR region.
Maybe just jumbling them into the general vmalloc address range would be
beneficial from a security point of view?  I suspect it's not all
that useful because most modules are loaded early on.

We seem to have randomness mixed into the vmalloc allocations with
DEBUG_AUGMENT_LOWEST_MATCH_CHECK, but there doesn't seem to be an
ASLR option to vmalloc ... Uladzislau?


  reply	other threads:[~2020-11-20 15:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 16:05 [PATCH v4] mm: Optional full ASLR for mmap() and mremap() Topi Miettinen
2020-11-17 16:54 ` Matthew Wilcox
2020-11-17 20:21   ` Topi Miettinen
2020-11-18 17:40     ` Mike Rapoport
     [not found]     ` <6810b874c8df456b890d1092273b354a@pexch011a.vu.local>
2020-11-18 18:49       ` Cristiano Giuffrida
2020-11-19  9:59         ` Topi Miettinen
     [not found]         ` <0da9cb0a4d1a494d9ec15404f8decf01@pexch011a.vu.local>
2020-11-19 22:20           ` Cristiano Giuffrida
2020-11-20  8:38             ` Topi Miettinen
2020-11-20 15:27               ` Matthew Wilcox [this message]
     [not found]             ` <d7e759c8ac444aa4b0ba6932563aca00@pexch011a.vu.local>
2020-11-20 14:10               ` Cristiano Giuffrida
2020-11-20 19:37                 ` Topi Miettinen
2020-11-18 22:42   ` Jann Horn
2020-11-19  9:16     ` Topi Miettinen
2020-11-24 18:27 ` Vlastimil Babka

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=20201120152716.GA4327@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=c.giuffrida@vu.nl \
    --cc=jannh@google.com \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rppt@kernel.org \
    --cc=toiwoton@gmail.com \
    --cc=urezki@gmail.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 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).