From owner-freebsd-current@FreeBSD.ORG Wed Jun 10 16:26:32 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7CAB1065670 for ; Wed, 10 Jun 2009 16:26:32 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 9CA328FC12 for ; Wed, 10 Jun 2009 16:26:32 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 05D2D1CD8A; Wed, 10 Jun 2009 18:26:32 +0200 (CEST) Date: Wed, 10 Jun 2009 18:26:31 +0200 From: Ed Schouten To: Jilles Tjoelker Message-ID: <20090610162631.GP48776@hoeg.nl> References: <4A2D62B6.9080207@quis.cx> <20090609211621.GA24874@stack.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="drkdbItNQN0oJM6x" Content-Disposition: inline In-Reply-To: <20090609211621.GA24874@stack.nl> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: Jille Timmermans , FreeBSD Current Subject: Re: panic: oof, we didn't get our fd while playing with devfs(8) and jails X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 16:26:33 -0000 --drkdbItNQN0oJM6x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey Jilles, * Jilles Tjoelker wrote: > This KASSERT may happen if you execute a setuid/setgid program with one > or more of fd 0, 1, 2 closed, and you cannot open /dev/null (e.g. not > present, bad permissions). The assertion checks td->td_retval[0] even if > kern_open() failed. After that, if td->td_retval[0] happened to be equal > to the expected value or INVARIANTS was disabled, the function checks if > kern_open() failed. If so, it returns an error which eventually causes > "whoops, no process anymore" process termination in do_execve() (appears > as SIGABRT). Too bad we don't have some kind of global nullfd that we could just dup everywhere. I really don't like the way how we depend on certain pathnames within the kernel. --=20 Ed Schouten WWW: http://80386.nl/ --drkdbItNQN0oJM6x Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkov3rcACgkQ52SDGA2eCwWrygCfdwaVTlwcq5LuvJgtqlgdIdaV NDgAnjaV9zB+rwwWHLIM00iP8gxieFS0 =QvVN -----END PGP SIGNATURE----- --drkdbItNQN0oJM6x--