[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201203065801.GH751215@kernel.org>
Date: Thu, 3 Dec 2020 08:58:01 +0200
From: Mike Rapoport <rppt@...nel.org>
To: Topi Miettinen <toiwoton@...il.com>
Cc: linux-hardening@...r.kernel.org, akpm@...ux-foundation.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Andy Lutomirski <luto@...nel.org>,
Jann Horn <jannh@...gle.com>,
Kees Cook <keescook@...omium.org>,
Linux API <linux-api@...r.kernel.org>,
Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH] mm/vmalloc: randomize vmalloc() allocations
On Wed, Dec 02, 2020 at 08:49:06PM +0200, Topi Miettinen wrote:
> On 1.12.2020 23.45, Topi Miettinen wrote:
> > Memory mappings inside kernel allocated with vmalloc() are in
> > predictable order and packed tightly toward the low addresses. With
> > new kernel boot parameter 'randomize_vmalloc=1', the entire area is
> > used randomly to make the allocations less predictable and harder to
> > guess for attackers.
> >
>
> This also seems to randomize module addresses. I was going to check that
> next, so nice surprise!
Heh, that's because module_alloc() uses vmalloc() in that way or another :)
> -Topi
>
> > spin_unlock(&free_vmap_area_lock);
> > if (unlikely(addr == vend))
> >
>
--
Sincerely yours,
Mike.
Powered by blists - more mailing lists