On Mon, Mar 30, 2009 at 09:18:50PM +1100, u...@vk2pj.dyndns.org wrote:
> Hi Xin,
> 
> On 2009-Mar-28 04:00:46 +0000, Xin LI <delp...@freebsd.org> wrote:
> >Log:
> >  When allocating memory, zero out them if we don't intend to overwrite them
> >  all; before freeing memory, zero out them before we release it as free
> >  heap.  This will eliminate some potential information leak issue.
> 
> Given that db runs with the same privileges as the process using it, I
> don't see how zeroing memory eliminates any information leak - the
> process can directly open and read the underlying db file itself.
> Zeroing on allocation may fix any potential issue with uninitialised
> structures and prevent the return of garbage in "holes" but that's not
> an information leak.

Consider /etc/pwd.db.  It's world readable, but written by a program that
also wrote /etc/spwd.db which definitely is not.

-- Brooks

Attachment: pgpYzvBWDtEgZ.pgp
Description: PGP signature

Reply via email to