Thread (51 messages) flat view 51 messages, 14 authors, 2016-07-11

Re: [PATCH 1/9] mm: Hardened usercopy

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-07-08 05:34:24
Also in: linux-mm

Kees Cook [off-list ref] writes:
On Thu, Jul 7, 2016 at 4:01 AM, Arnd Bergmann [off-list ref] wrote:
quoted
On Wednesday, July 6, 2016 3:25:20 PM CEST Kees Cook wrote:
quoted
+
+     /* Allow kernel rodata region (if not marked as Reserved). */
+     if (ptr >= (const void *)__start_rodata &&
+         end <= (const void *)__end_rodata)
+             return NULL;
Should we explicitly forbid writing to rodata, or is it enough to
rely on page protection here?
Hm, interesting. That's a very small check to add. My knee-jerk is to
just leave it up to page protection. I'm on the fence. :)
There are platforms that don't have page protection, so it would be nice
if they could at least opt-in to checking for it here.

cheers

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help