From owner-freebsd-audit Mon Nov 29 1:21:14 1999 Delivered-To: freebsd-audit@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 758) id 25B8014ED7; Mon, 29 Nov 1999 01:21:13 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 106BB1CD474; Mon, 29 Nov 1999 01:21:13 -0800 (PST) (envelope-from kris@hub.freebsd.org) Date: Mon, 29 Nov 1999 01:21:13 -0800 (PST) From: Kris Kennaway To: Sheldon Hearn Cc: Dan Moschuk , freebsd-audit@FreeBSD.ORG Subject: Re: New Random PID patch using arc4 available In-Reply-To: <21954.943862700@axl.noc.iafrica.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 29 Nov 1999, Sheldon Hearn wrote: > Could you explain the problems involved with linear PID allocation? If > it's already been explained in published notes, just a reference to > those notes would be great. One of the things it (neatly) solves is predictable PID-based tempfile naming - a lot of code out there likes to blindly create tempfiles using foo., perhaps with a few random characters added. In many cases with a linear PID model you can exploit this by "mining" the tempdir with a few hundred symlinks, hoping the process will pick one of the names and follow it into damnation. The proper fix is to use mkstemp() with lots of X's and make sure you don't have any race conditions in your tempfile handling, but this helps a lot. Kris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message