From owner-freebsd-current Sat Jun 10 15:13:36 2000 Delivered-To: freebsd-current@freebsd.org Received: from cypherpunks.ai (cypherpunks.ai [209.88.68.47]) by hub.freebsd.org (Postfix) with ESMTP id D7A1A37BD83; Sat, 10 Jun 2000 15:13:28 -0700 (PDT) (envelope-from jeroen@vangelderen.org) Received: from vangelderen.org (grolsch.ai [209.88.68.214]) by cypherpunks.ai (Postfix) with ESMTP id 3436749; Sat, 10 Jun 2000 18:13:20 -0400 (AST) Message-ID: <3942BD80.F7354092@vangelderen.org> Date: Sat, 10 Jun 2000 18:13:20 -0400 From: "Jeroen C. van Gelderen" X-Mailer: Mozilla 4.72 [en] (X11; I; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Kris Kennaway Cc: "Andrey A. Chernov" , Mark Murray , current@FreeBSD.ORG Subject: Re: mktemp() patch References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Kris Kennaway wrote: > > On Sat, 10 Jun 2000, Kris Kennaway wrote: > > > Given the other replies in this thread I think I'll just remove the PID > > stuff altogether and make the temp filename only constructed from > > alphanumeric character. The price is that there's a chance of collision > > between two programs who mktemp() and come up with the same random > > filename, which is a theoretical security risk (at present only something > > with the same PID can come up with a colliding tempfile name) but the > > probability is altogether pretty small. I'll do some calculations to > > estimate the exact level of risk here. > > Actually, it's not of course a security risk in the new algorithm (this is > mktemp() after all), but it's a potential failure mode which can cause > applications to fail in ways they otherwise wouldn't (with some very low > probability) on a normal system. But, I don't think it's a big enough > problem to worry about (numbers still coming :-) It's not a new situation, any application that can write to /tmp can create files that collide with other program's use of mktemp(). Cheers, Jeroen -- Jeroen C. van Gelderen o _ _ _ jeroen@vangelderen.org _o /\_ _ \\o (_)\__/o (_) _< \_ _>(_) (_)/<_ \_| \ _|/' \/ (_)>(_) (_) (_) (_) (_)' _\o_ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message