From owner-freebsd-security@FreeBSD.ORG Fri Mar 12 07:18:57 2004 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0052316A4CE; Fri, 12 Mar 2004 07:18:57 -0800 (PST) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8451843D48; Fri, 12 Mar 2004 07:18:55 -0800 (PST) (envelope-from ru@ip.net.ua) Received: from heffalump.office.ipnet (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.10/8.12.9) with ESMTP id i2CFMkee057994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Mar 2004 17:22:48 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.office.ipnet (8.12.11/8.12.11) id i2CFImct002270; Fri, 12 Mar 2004 17:18:48 +0200 (EET) (envelope-from ru) Date: Fri, 12 Mar 2004 17:18:48 +0200 From: Ruslan Ermilov To: "Jacques A. Vidrine" , Marc Olzheim , Morten Rodal , security@FreeBSD.org Message-ID: <20040312151848.GA2235@ip.net.ua> References: <200403120922.i2C9M0jC002510@stud326.idi.ntnu.no> <20040312104914.GA52099@ip.net.ua> <20040312105730.GA99925@stud326.idi.ntnu.no> <20040312110657.GB52099@ip.net.ua> <20040312111526.GA14260@stack.nl> <20040312125820.GA8574@lum.celabo.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline In-Reply-To: <20040312125820.GA8574@lum.celabo.org> User-Agent: Mutt/1.5.6i X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Subject: Re: bin/64150: [PATCH] ls(1) coredumps when started via execve(2) with no argv. X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Security issues [members-only posting] List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2004 15:18:57 -0000 --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 12, 2004 at 06:58:20AM -0600, Jacques A. Vidrine wrote: > On Fri, Mar 12, 2004 at 12:15:26PM +0100, Marc Olzheim wrote: > > On Fri, Mar 12, 2004 at 01:06:57PM +0200, Ruslan Ermilov wrote: > > > And the fact that optind is initially set to 1. I wonder what > > > could be the implications for setuid programs. There could be > > > quite unpredictable results, as the "argv" pointer is incorrectly > > > advanced in this case, and at least several setuid programs that > > > I've glanced at are vulnerable to this attack. > >=20 > > See also: http://www.freebsd.org/cgi/query-pr.cgi?pr=3D33738 >=20 > Thanks Ruslan, Marc, >=20 > I think kern/33738 is on the money. I do not see any immediate > ramifications, but for peace of mind I believe that exec should fail if > the argument array pointer is NULL. >=20 > I believe this would be consistent with the relevant standards: POSIX > already requires (a) that the first argument ``should point to a > filename that is associated with the process being started'' and (b) > ``the last member of this array is a null pointer''--- i.e. the array > pointer cannot be NULL. >=20 I will track it down later today, and follow-up with what I have. Cheers, --=20 Ruslan Ermilov FreeBSD committer ru@FreeBSD.org --mP3DRpeJDSE+ciuQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAUdTYUkv4P6juNwoRAixQAKCBSw56kFsoRc4aG86/dF/mOArQFgCfeHvd ObYBZ5wWQnSm1EH7BVbgufw= =Yj5+ -----END PGP SIGNATURE----- --mP3DRpeJDSE+ciuQ--