Re: Malloc -Z
On Wed, 27 Jul 2011 02:49:48 -0400
grarpamp wrote:
> Was reading malloc(3) while chasing corruption suspects.
> Does the presence of -Z imply that without it, programs
> can be allocated dirty (non-zeroed) memory?
Programs (in the sense of processes) are allocated zeroed-memory.
Memory allocated by malloc will either be zeroed or contain pages
written to by the same process.
In general any security concerns about sensitive data should be handled
by zeroing before freeing (or when the data is no longer needed) rather
than zeroing on allocation.
_______________________________________________
freebsd-security@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-security
To unsubscribe, send any mail to "freebsd-security-unsubscribe@freebsd.org"
討論串 (同標題文章)
完整討論串 (本文為第 6 之 9 篇):