From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10952f,b69d377feb5a8a2 X-Google-Attributes: gid10952f,public X-Google-Thread: 10872d,d4c1f7c0fe672a4 X-Google-Attributes: gid10872d,public X-Google-Thread: 1020c6,d4c1f7c0fe672a4 X-Google-Attributes: gid1020c6,public X-Google-Thread: 1164f8,d4c1f7c0fe672a4 X-Google-Attributes: gid1164f8,public X-Google-Thread: 1070f0,d4c1f7c0fe672a4 X-Google-Attributes: gid1070f0,public X-Google-Thread: fcda7,d4c1f7c0fe672a4 X-Google-Attributes: gidfcda7,public From: Barry Margolin Subject: Re: Secure cleaning of /tmp was Different Unixes pros & cons Date: 1998/09/21 Message-ID: <51zN1.54$LN.897820@burlma1-snr1.gtei.net>#1/1 X-Deja-AN: 393408782 Distribution: world References: <35F71814.1E0B911C@iakom.com> <36069B1E.14553C26@llnl.gov> <6u67of$cae@web.nmti.com> X-Trace: burlma1-snr1.gtei.net 906411201 4.2.32.97 (Mon, 21 Sep 1998 20:53:21 GMT) Organization: GTE Internetworking, Cambridge, MA NNTP-Posting-Date: Mon, 21 Sep 1998 20:53:21 GMT Newsgroups: comp.unix.admin,comp.sys.hp.hpux,comp.sys.sgi.admin,comp.sys.sun.admin,comp.sys.dec,comp.security.unix Originator: barmar@bbnplanet.com (Barry Margolin) In article <6u67of$cae@web.nmti.com>, Peter da Silva wrote: >In article <36069B1E.14553C26@llnl.gov>, >Jim Mellander wrote: >>You're correct. Thank you for clearing that up. However, I have yet to >>see a program to clean /tmp that is not vulnerable to race conditions. > >Sure you have. Any program that changes directory to the victim's before >checking it. Once it's changed directory, there's no manipulation with >any path under /tmp that will budge it. That solves the race condition on the directory, but not on the file itself. For instance, between the time that find identifies a file as being older than 7 days and when the rm is done, the file could be deleted and replaced by a new one. This new one will be deleted even though it's only a few seconds old, rather than more than a week old. If your goal is to avoid race conditions that can be used as security holes, you're probably right. But if your goal is a fully correct /tmp cleaner, possibilities like this will always exist unless special kernel support is provided. -- Barry Margolin, barmar@bbnplanet.com GTE Internetworking, Powered by BBN, Burlington, MA *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.