Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.lang.c Subject: Re: Life after free? Keywords: free malloc Message-ID: <1990Oct08.002613.17722@virtech.uucp> Date: 8 Oct 90 00:26:13 GMT References: <1990Oct05.020434.12344@virtech.uucp> <688@demott.COM> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Distribution: comp Organization: Virtual Technologies Inc., Sterling VA Lines: 27 In article <688@demott.COM> kdq@demott.COM (Kevin D. Quitt) writes: >In article <1990Oct05.020434.12344@virtech.uucp> cpcahil@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