From ji@research.att.com  Tue May  2 19:26:24 2000
Return-Path: <ji@research.att.com>
Received: from mail-green.research.att.com (H-135-207-30-103.research.att.com [135.207.30.103])
	by hub.freebsd.org (Postfix) with ESMTP id 1C6E037BD46
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  2 May 2000 19:26:24 -0700 (PDT)
	(envelope-from ji@research.att.com)
Received: from amontillado.research.att.com (amontillado.research.att.com [135.207.24.32])
	by mail-green.research.att.com (Postfix) with ESMTP id 2ACC71E01D
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  2 May 2000 22:26:22 -0400 (EDT)
Received: from bual.research.att.com (bual.research.att.com [135.207.24.19])
	by amontillado.research.att.com (8.8.7/8.8.7) with ESMTP id WAA09730
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 2 May 2000 22:26:10 -0400 (EDT)
Received: (from ji@localhost) by bual.research.att.com (8.7.5/8.7) id WAA14924; Tue, 2 May 2000 22:26:20 -0400 (EDT)
Message-Id: <200005030226.WAA14924@bual.research.att.com>
Date: Tue, 2 May 2000 22:26:20 -0400 (EDT)
From: John Ioannidis <ji@research.att.com>
Sender: John Ioannidis <ji@research.att.com>
Reply-To: ji@research.att.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: what happened to "file" in procfs in 4.0-STABLE?

>Number:         18358
>Category:       kern
>Synopsis:       /proc process directories don't have a "file" entry
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    green
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May  2 19:30:01 PDT 2000
>Closed-Date:    Wed Nov 28 11:42:50 PST 2001
>Last-Modified:  Wed Nov 28 11:48:11 PST 2001
>Originator:     John "Heldenprogrammer" Ioannidis
>Release:        FreeBSD 4.0-RELEASE i386
>Organization:
AT&T Labs - Research
>Environment:

4.0-STABLE, cvsup'ed on 5/2/2000.

>Description:

/proc file system directories don't have a "file" link.

>How-To-Repeat:

ls -l /proc/*/file
ls: /proc/*/file: No such file or directory

>Fix:

???



>Release-Note:
>Audit-Trail:

From: David Malone <dwmalone@maths.tcd.ie>
To: freebsd-gnats-submit@FreeBSD.org, ji@research.att.com
Cc: green@FreeBSD.org
Subject: Re: kern/18358: /proc process directories don't have a "file" entry
Date: Thu, 04 May 2000 13:28:04 +0100

 The implimentation of /proc/file was found to be a security problem,
 as it exposed suid binaries to the world, which might not otherwise
 have been visable.
 
 This has been replaced in 5.0 (I think by Brian Feldman?) with a
 implimentation more like the one used in Linux, which uses a symlink
 to the binary and so doesn't expose suid binaries. I guess this
 will be backported to 4.X before 4.1 will be released.
 
 Maybe this PR could be given to Brian to remind him to MFC when
 the code is ready?
 
 	David.
 
Responsible-Changed-From-To: freebsd-bugs->green 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Thu May 4 08:40:07 PDT 2000 
Responsible-Changed-Why:  
Reminder for Brian to backport the more secure symlink ``file'' node 
to RELENG_4. 
State-Changed-From-To: open->closed 
State-Changed-By: green 
State-Changed-When: Wed Nov 28 11:42:50 PST 2001 
State-Changed-Why:  
This is in both -CURRENT and -STABlLE. My only qualm is there is a race 
if the file has permission to be hardlinked to by a user, which can be 
solved by storing the original directory vnode used to get the textvp 
for the process. Then, the only possible insecurity would be someone who 
already had valid permissions modifying the paths (which they could do 
to screw things upp anyway, without proc/foo/file). 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=18358 
>Unformatted:
