From owner-freebsd-audit Sun Nov 19 22:39: 0 2000 Delivered-To: freebsd-audit@freebsd.org Received: from citusc17.usc.edu (citusc17.usc.edu [128.125.38.177]) by hub.freebsd.org (Postfix) with ESMTP id 458BC37B479; Sun, 19 Nov 2000 22:38:58 -0800 (PST) Received: (from kris@localhost) by citusc17.usc.edu (8.11.1/8.11.1) id eAK6dm371978; Sun, 19 Nov 2000 22:39:48 -0800 (PST) (envelope-from kris) Date: Sun, 19 Nov 2000 22:39:47 -0800 From: Kris Kennaway To: Mark Murray Cc: Kris Kennaway , audit@FreeBSD.ORG Subject: Re: m4 tempfile fix Message-ID: <20001119223947.A71937@citusc17.usc.edu> References: <20001119165711.A3579@citusc17.usc.edu> <200011200611.eAK6BdJ17996@gratis.grondar.za> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="Kj7319i9nmIyA2yE" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200011200611.eAK6BdJ17996@gratis.grondar.za>; from mark@grondar.za on Mon, Nov 20, 2000 at 08:11:35AM +0200 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 20, 2000 at 08:11:35AM +0200, Mark Murray wrote: > > m4 was abusing mktemp() to make a unique prefix but then tacking on > > predictable prefixes to make multiple files. I fixed it to create a > > secure directory where it can play with its insecure filenames to its > > heart content. Reviews, anyone? >=20 > Don't like it, particularly if the directory is reasonably long-lived. >=20 > All an attacker needs to do is spin-wait for your dir, then cd into it. mkdtemp() creates directories mode 0700 Kris --Kj7319i9nmIyA2yE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjoYxzMACgkQWry0BWjoQKXtVACgvo5rhCdxaXcrhToSYW3KdgK/ wq8AnilDZmGkvjRHSYMkfRSjo+rXNOua =PXNt -----END PGP SIGNATURE----- --Kj7319i9nmIyA2yE-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message