Thread (89 messages) 89 messages, 18 authors, 2017-05-13

Re: [kernel-hardening] Re: [PATCH v9 1/4] syscalls: Verify address limit before returning to user-mode

From: Peter Zijlstra <peterz@infradead.org>
Date: 2017-05-12 20:31:31
Also in: linux-arm-kernel, linux-s390, lkml

On Fri, May 12, 2017 at 09:21:06PM +0100, Russell King - ARM Linux wrote:
On Fri, May 12, 2017 at 12:30:02PM -0700, Kees Cook wrote:
quoted
I'm clearly not explaining things well enough. I shouldn't say
"corruption", I should say "malicious manipulation". The methodology
of attacks against the stack are quite different from the other kinds
of attacks like use-after-free, heap overflow, etc. Being able to
exhaust the kernel stack (either due to deep recursion or unbounded
alloca())
I really hope we don't have alloca() use in the kernel.  Do you have
evidence to support that assertion?

IMHO alloca() (or similar) should not be present in any kernel code
because we have a limited stack - we have kmalloc() etc for that kind
of thing.
On stack variable length arrays get implemented by the compiler doing
alloca(), and we sadly have a few of those around.

But yes, fully agreed on the desirability of alloca() and things.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help