Re: [PATCH v4] mm/vmalloc: randomize vmalloc() allocations

From
Kees Cook <hidden>
Date
2021-03-15 16:17:07
Also in
linux-hardening, linux-mm, lkml
Reply to
Uladzislau Rezki, 2021-03-15
On Mon, Mar 15, 2021 at 01:24:10PM +0100, Uladzislau Rezki wrote:
On Mon, Mar 15, 2021 at 11:04:42AM +0200, Topi Miettinen wrote:
quoted
What's the problem with that? It seems to me that nothing relies on specific
addresses of the chunks, so it should be possible to randomize these too.
Also the alignment is honored.
My concern are:

- it is not a vmalloc allocator;
- per-cpu allocator allocates chunks, thus it might be it happens only once. It does not allocate it often;
That's actually the reason to randomize it: if it always ends up in the
same place at every boot, it becomes a stable target for attackers.
- changing it will likely introduce issues you are not aware of;
- it is not supposed to be interacting with vmalloc allocator. Read the
  comment under pcpu_get_vm_areas();

Therefore i propose just not touch it.
How about splitting it from this patch instead? Then it can get separate
testing, etc.

-- 
Kees Cook
Thread (13 messages) 13 messages, 3 authors, last reply 2021-03-16
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help