lkml.org 
[lkml]   [2005]   [Jun]   [7]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 07 Jun 2005 11:57:06 -0400
FromPeter Staubach <>
SubjectRe: Zeroed pages returned for heap
Nagendra Singh Tomar wrote:

>Hi all,
>	The short version first.
>Is it OK for an application (a C library implementing malloc/calloc is 
>also an application) to assume that the pages returned by the OS for heap 
>allocation (either directly thru brk() or thru mmap(MAP_ANONYMOUS)) will 
>be zero filled. 
>

An application which makes assumptions about the contents of newly allocated
memory would seem to be making very dangerous assumptions.

Ignoring that, would it not be considered to be a security violation to hand
pieces of memory to applications without erasing the old contents of the 
pages?

    Thanx...

       ps
-
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: 2005-06-07 16:05    [from the cache]
©2003-2008