lkml.org 
[lkml]   [2007]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Undo some of the pseudo-security madness
From
Date

> No amount of carefulness will prevent vendors stick arbitrarily
> damaging values of stack and mmap base randomisation, severely reducing
> the usefullness of MAP_FIXED.

MAP_FIXED is useful still. The only safe way is to use addresses you got
from mmap(), eg you overmap something.
Anything else is madness, with or without randomization. The C library
for example is free, and does, allocate memory and stacks etc etc.

Same for many other libraries; in addition libraries change in size all
the time... MAP_FIXED of an address you don't KNOW is free is a bug.
Period.
(using an address previously obtained from mmap() is safest, but you
could in theory also parse /proc/self/maps, although that is racey,
since nothing guarantees that the C library didn't spawn a background
thread that allocates memory)


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-01-31 18:23    [W:0.128 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site