From owner-freebsd-arch Fri Sep 13 6:51: 3 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E45AE37B400; Fri, 13 Sep 2002 06:51:01 -0700 (PDT) Received: from avocet.mail.pas.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D48E43E6A; Fri, 13 Sep 2002 06:51:01 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0166.cvx21-bradley.dialup.earthlink.net ([209.179.192.166] helo=mindspring.com) by avocet.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17pqqZ-000762-00; Fri, 13 Sep 2002 06:50:59 -0700 Message-ID: <3D81ED04.C016B3B0@mindspring.com> Date: Fri, 13 Sep 2002 06:49:56 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Nate Lawson Cc: Garrett Wollman , arch@freebsd.org, imp@freebsd.org, peter@freebsd.org Subject: Re: PATCH: vnode->v_tag to const char * References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Nate Lawson wrote: > For those just tuning in, if a set[ug]id program has /proc/mumble open on > fds 0-2, it's possible it could inadvertently write to them, causing a > crash. The check is_unsafe() in kern_descrip.c handles this case. > > I changed it to use VFCF_SYNTHETIC instead but that is not right -- > fdescfs and devfs (think: /dev/fd/*, /dev/tty) are also synthetic. And > what about portal ... ? > > What is the 'right' way to keep sugid programs from crashing the system > with open 0-2 fds? Hook 1 and 2, which are output fd's, to /dev/null, if you *must* have them open. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message