Re: memory pages nulling when releasing



On Sun, 18 Jun 2006 12:27:22 +0400
"Nick Borisov" <neiro21@xxxxxxxxx> wrote:

Hello everyone!

Could you tell me if FreeBSD supports memory page nulling when
releasing it to prevent unauthorized access to data left in the page
after it's allocated again.

I'm certainly not as expert in this area, but I thought I'd
offer the following suggestions anyway (I'm assuming you're
coding in C, here):
- You might want to look at _malloc_options /
MALLOC_OPTIONS (for example, '_malloc_options = "J";'), though
this might be an expensive way to achieve the goal. See man 2
free for more information
- You could zero a memory range explicitly before free()ing
it, using bzero(3) or memset(3), for instance, or even just by
assignment in some cases. This has the notable advantage that
you can hand-pick which data you're zeroing based on individual
merit

If it does, what sys calls etc provide that?
IMHO this is an important issue when operating data with different
sensivity levels.

Thanks in advance.

Nick

Hope that helps!
--
Nick Withers
email: nick@xxxxxxxxxxxxxxx
Web: http://www.nickwithers.com
Mobile: +61 414 397 446
_______________________________________________
freebsd-security@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-security
To unsubscribe, send any mail to "freebsd-security-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: memory pages nulling when releasing
    ... > Could you tell me if FreeBSD supports memory page nulling when ... > releasing it to prevent unauthorized access to data left in the page ...
    (FreeBSD-Security)
  • memory pages nulling when releasing
    ... Could you tell me if FreeBSD supports memory page nulling when ... releasing it to prevent unauthorized access to data left in the page ...
    (FreeBSD-Security)
  • Re: Anyone know why the Alpha market is so so quiet?
    ... We noticed cron jobs were not getting run and cron was dying on their ... The bug was kicked up to AT&T. ... The cron was malloc'ing memory and never releasing it so it used up all ...
    (comp.os.vms)
  • Re: Not enough storage space
    ... Closing or even destroying (releasing) the command objects does not seem to help. ... This will actually release the memory or, as I experienced it, will put a ceiling on how much memory is used. ... has to be solved using what I'm using (evc++4, sqlce2 and OLEDB) Every ...
    (microsoft.public.sqlserver.ce)
  • Re: Memory problems (possibly very easy question)
    ... It is a common delusion that if you free storage your program should get smaller; ... memory usage warnings. ... But releasing it does not reduce the footprint, it merely keeps it from growing as the ... fragmentation may mean that the footprint will continue to grow, ...
    (microsoft.public.vc.mfc)