Life after free?
Conor P. Cahill
cpcahil at virtech.uucp
Mon Oct 8 10:26:13 AEST 1990
In article <688 at demott.COM> kdq at demott.COM (Kevin D. Quitt) writes:
>In article <1990Oct05.020434.12344 at virtech.uucp> cpcahil at virtech.uucp (Conor P. Cahill) writes:
>>Even if free() did release the memory to the OS, as long as the object
>>reuse policy of the OS cleared the free'd pages prior to allocating them
>>to a new process it would meet secure system requirements.
>
> This is not as safe as clearing it before releasing it. An operting
>system can often be coerced into giving dirty pages to a task. Unless
>the system can be mathematically proven to be immune from this, the
As far as I remember (and that may not be that far) mathematical proof
is only required in A1 systems.
And besides, it's just as easy to clear them at startup/acess time as it
is to clean it up at end/de-access time.
But we get away from the point. The original posting was about whether
the original program could us a pointer obtained from malloc() after
it was passed to free. If it was released back to the OS, then it wouldn't
matter if it was cleared since the original program no longer has access
to it.
--
Conor P. Cahill (703)430-9247 Virtual Technologies, Inc.,
uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160
Sterling, VA 22170
More information about the Comp.lang.c
mailing list