Date: Fri, 12 Mar 2004 17:46:00 +0200 From: Ruslan Ermilov <ru@FreeBSD.org> To: "Jacques A. Vidrine" <nectar@FreeBSD.org> Cc: security@FreeBSD.org Subject: Re: bin/64150: [PATCH] ls(1) coredumps when started via execve(2) with no argv. Message-ID: <20040312154600.GC2235@ip.net.ua> In-Reply-To: <20040312125820.GA8574@lum.celabo.org> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--0vzXIDBeUiKkjNJl 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 As Garrett already pointed out in the PR log, have you considered this? http://www.opengroup.org/onlinepubs/007904975/functions/execve.html#tag_03_= 130_08 I'm happy with changing our behavior to Strictly Conforming for the goods of security, and you? Cheers, --=20 Ruslan Ermilov FreeBSD committer ru@FreeBSD.org --0vzXIDBeUiKkjNJl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAUds4Ukv4P6juNwoRAggyAJ9fSMInyRNirSHvEUe3vWDunGIoJwCdGZ9D KFfxioR9lic6sGOHry/N4jM= =1mUE -----END PGP SIGNATURE----- --0vzXIDBeUiKkjNJl--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040312154600.GC2235>