From nobody@FreeBSD.org  Wed May 11 17:38:51 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9CCFD16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 May 2005 17:38:51 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7417743D58
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 May 2005 17:38:51 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j4BHcpqb092802
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 May 2005 17:38:51 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j4BHcohd092753;
	Wed, 11 May 2005 17:38:50 GMT
	(envelope-from nobody)
Message-Id: <200505111738.j4BHcohd092753@www.freebsd.org>
Date: Wed, 11 May 2005 17:38:50 GMT
From: Caitlen <aeonflux@aeonflux.no-ip.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: tmpmfs default change
X-Send-Pr-Version: www-2.3

>Number:         80907
>Category:       conf
>Synopsis:       tmpmfs default change
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    yar
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 11 17:40:02 GMT 2005
>Closed-Date:    Thu Jul 12 20:00:13 GMT 2007
>Last-Modified:  Thu Jul 12 20:00:13 GMT 2007
>Originator:     Caitlen
>Release:        release 5.4
>Organization:
none
>Environment:
FreeBSD agony 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Mon May  9 22:51:42 ADT 2005     aeonflux@agony:/usr/obj/usr/src/sys/AGONY  i386

>Description:
by default
tmpmfs_flags="-S"
When in reality
 tmpmfs_flags="-S -o nosymfollow,nosuid"

would be much safer
>How-To-Repeat:
      
>Fix:
tmpmfs_flags="-S -o nosymfollow,nosuid"
>Release-Note:
>Audit-Trail:

From: Giorgos Keramidas <keramida@freebsd.org>
To: Caitlen <aeonflux@aeonflux.no-ip.com>
Cc: bug-followup@freebsd.org
Subject: Re: conf/80907: tmpmfs default change
Date: Thu, 12 May 2005 15:59:12 +0300

 On 2005-05-11 17:38, Caitlen <aeonflux@aeonflux.no-ip.com> wrote:
 > by default
 > tmpmfs_flags="-S"
 > When in reality
 > tmpmfs_flags="-S -o nosymfollow,nosuid"
 >
 > would be much safer
 
 I don't think this is really a bug, but anyway.  It would probably be
 safer to use:
 
 	tmpmfs_flags="-S -o noatime,noexec,nosuid,nosymfollow"
 
 The ability to actually *use* whatever options are best for your system
 is exactly why I made the original change to rc.d/tmp, but I'm not sure
 if it would be good to enforce so strict permissions to everyone :-/
 

From: aeonflux <aeonflux@aeonflux.no-ip.com>
To: Giorgos Keramidas <keramida@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: conf/80907: tmpmfs default change
Date: Thu, 12 May 2005 14:03:28 -0300

 On May 12, 2005 09:59 am, Giorgos Keramidas wrote:
 > On 2005-05-11 17:38, Caitlen <aeonflux@aeonflux.no-ip.com> wrote:
 > > by default
 > > tmpmfs_flags="-S"
 > > When in reality
 > > tmpmfs_flags="-S -o nosymfollow,nosuid"
 > >
 > > would be much safer
 >
 > I don't think this is really a bug, but anyway.  It would probably be
 > safer to use:
 >
 > 	tmpmfs_flags="-S -o noatime,noexec,nosuid,nosymfollow"
 >
 > The ability to actually *use* whatever options are best for your system
 > is exactly why I made the original change to rc.d/tmp, but I'm not sure
 > if it would be good to enforce so strict permissions to everyone :-/
 Good point, but I do think a nosymfollow is a good default.  There's really no 
 reason to allow /tmp symlink race conditions to happen.  SInce it's a memory 
 fs, disabling atime doesn't really make a big difference.
 
 Anyways just a suggestion, I'll be definitely setting nosymfollow on my 
 machine here.

From: Giorgos Keramidas <keramida@freebsd.org>
To: aeonflux <aeonflux@aeonflux.no-ip.com>
Cc: bug-followup@freebsd.org
Subject: Re: conf/80907: tmpmfs default change
Date: Fri, 13 May 2005 14:55:59 +0300

 On 2005-05-12 17:10, aeonflux <aeonflux@aeonflux.no-ip.com> wrote:
 >On May 12, 2005 09:59 am, Giorgos Keramidas wrote:
 >> On 2005-05-11 17:38, Caitlen <aeonflux@aeonflux.no-ip.com> wrote:
 >> > by default
 >> > tmpmfs_flags="-S"
 >> > When in reality
 >> > tmpmfs_flags="-S -o nosymfollow,nosuid"
 >> >
 >> > would be much safer
 >>
 >> I don't think this is really a bug, but anyway.  It would probably be
 >> safer to use:
 >>
 >> 	tmpmfs_flags="-S -o noatime,noexec,nosuid,nosymfollow"
 >>
 >> The ability to actually *use* whatever options are best for your system
 >> is exactly why I made the original change to rc.d/tmp, but I'm not sure
 >> if it would be good to enforce so strict permissions to everyone :-/
 >
 > Good point, but I do think a nosymfollow is a good default.  There's really no
 > reason to allow /tmp symlink race conditions to happen.  SInce it's a memory
 > fs, disabling atime doesn't really make a big difference.
 >
 > Anyways just a suggestion, I'll be definitely setting nosymfollow on my
 > machine here.
 
 I'm a bit worried about giving a false sense of "secure default setup",
 by having /tmp mounted as "nosymfollow".  Users who are determined to
 attempt symlink race hacks may also set TMPDIR=/var/tmp or even
 TMPDIR=/home/smartass/tmp and try their luck there.
 
 Mounting both /tmp and /var as nosymfollow runs the risk of crippling
 everyone's use of the file systems without actually being a 100%
 bulletproof solution.
 
 - Giorgos
 
State-Changed-From-To: open->feedback 
State-Changed-By: yar 
State-Changed-When: Sun Mar 4 07:19:13 UTC 2007 
State-Changed-Why:  
The conclusion of the discussion was that changing tmpmfs 
defaults doesn't buy much security, but will break existing 
setups.  This would violate POLA.  Therefore I suggest this 
PR be closed. 


Responsible-Changed-From-To: freebsd-bugs->yar 
Responsible-Changed-By: yar 
Responsible-Changed-When: Sun Mar 4 07:19:13 UTC 2007 
Responsible-Changed-Why:  
Taking this... 

http://www.freebsd.org/cgi/query-pr.cgi?pr=80907 
State-Changed-From-To: feedback->closed 
State-Changed-By: yar 
State-Changed-When: Thu Jul 12 19:58:30 UTC 2007 
State-Changed-Why:  
The conclusion of the discussion was that changing tmpmfs 
defaults doesn't buy much security, but will break existing 
setups.  That would violate POLA.  Therefore this PR is being 
closed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=80907 
>Unformatted:
