From owner-freebsd-security@FreeBSD.ORG Wed Nov 5 09:41:57 2003 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 4114D16A4CE for ; Wed, 5 Nov 2003 09:41:57 -0800 (PST) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 877B543FEA for ; Wed, 5 Nov 2003 09:41:55 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost.nic.fr [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.9/8.12.9) with ESMTP id hA5HfrDa074768 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK CN=khavrinen.lcs.mit.edu issuer=SSL+20Client+20CA); Wed, 5 Nov 2003 12:41:54 -0500 (EST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.9/8.12.9/Submit) id hA5HfrBJ074765; Wed, 5 Nov 2003 12:41:53 -0500 (EST) (envelope-from wollman) Date: Wed, 5 Nov 2003 12:41:53 -0500 (EST) From: Garrett Wollman Message-Id: <200311051741.hA5HfrBJ074765@khavrinen.lcs.mit.edu> To: Kim Needham In-Reply-To: <5.2.0.9.0.20031105114806.00b34b98@mail.chariot.net.au> References: <20031104180932.GA70958@rot13.obsecurity.org> <001901c3a2de$7ab72c10$6855cd80@dhcp.hwi.buffalo.edu> <4529.141.149.242.190.1067993236.squirrel@mail.hwi.buffalo. edu> <5.2.0.9.0.20031105114806.00b34b98@mail.chariot.net.au> X-Spam-Score: -6.6 () IN_REP_TO,QUOTED_EMAIL_TEXT X-Scanned-By: MIMEDefang 2.37 X-Mailman-Approved-At: Thu, 13 Nov 2003 03:12:52 -0800 cc: freebsd-security@freebsd.org Subject: Re: Veractiy and FreeBSD 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: Wed, 05 Nov 2003 17:41:57 -0000 < said: > This is caused by a check that determines if the /proc filesystem is on > the same device as the file being read to prevent reading in files of > infinite length. The correct way to perform this check is to call fstatfs() on the file descriptor and examine f_fstypename[] to see what it is. You probably shouldn't look explicitly at the type name; use getvfsbyname() on the type name; if (vfc_flags & VFCF_SYNTHETIC) then the contents of the file system are generated by the kernel. -GAWollman