From owner-freebsd-fs@FreeBSD.ORG Thu Aug 22 23:13:05 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3297150B; Thu, 22 Aug 2013 23:13:05 +0000 (UTC) (envelope-from dewayne.geraghty@heuristicsystems.com.au) Received: from nschwmtas03p.mx.bigpond.com (nschwmtas03p.mx.bigpond.com [61.9.189.143]) by mx1.freebsd.org (Postfix) with ESMTP id 986A42D4F; Thu, 22 Aug 2013 23:13:04 +0000 (UTC) Received: from nschwcmgw07p ([61.9.190.167]) by nschwmtas03p.mx.bigpond.com with ESMTP id <20130822231257.LLHT2008.nschwmtas03p.mx.bigpond.com@nschwcmgw07p>; Thu, 22 Aug 2013 23:12:57 +0000 Received: from hermes.heuristicsystems.com.au ([58.172.113.247]) by nschwcmgw07p with BigPond Outbound id FzCw1m0095LKYmq01zCwwB; Thu, 22 Aug 2013 23:12:57 +0000 X-Authority-Analysis: v=2.0 cv=BKIxXSsG c=1 sm=1 a=YibVxx38Z+cwdCKSMcELyg==:17 a=wLMJVk681PMA:10 a=twTT4oUKOlYA:10 a=kj9zAlcOel0A:10 a=GHIR_BbyAAAA:8 a=f-zmaRjzSWEA:10 a=6I5d2MoRAAAA:8 a=SWg00rOMAAAA:8 a=v_pWlI0P17lZLm5KGXEA:9 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 a=3_5TX_vZOqAA:10 a=YibVxx38Z+cwdCKSMcELyg==:117 Received: from white (white.hs [10.0.5.2]) (authenticated bits=0) by hermes.heuristicsystems.com.au (8.14.5/8.13.6) with ESMTP id r7MNB2oR077761; Fri, 23 Aug 2013 09:11:02 +1000 (EST) (envelope-from dewayne.geraghty@heuristicsystems.com.au) From: "Dewayne Geraghty" To: , References: <52166351.4030106@delphij.net> Subject: RE: Allowing tmpfs to be mounted in jail? Date: Fri, 23 Aug 2013 09:11:02 +1000 Message-ID: <641D3DB0C34A482EA7F5902243F3F6D0@white> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <52166351.4030106@delphij.net> Thread-Index: Ac6fgOskX7VKuwASRCC5TtqA+PL7vgACanrA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 23:13:05 -0000 > -----Original Message----- > From: owner-freebsd-security@freebsd.org > [mailto:owner-freebsd-security@freebsd.org] On Behalf Of Xin Li > Sent: Friday, 23 August 2013 5:15 AM > To: freebsd-security@freebsd.org > Cc: freebsd-fs@freebsd.org; kib@freebsd.org > Subject: Allowing tmpfs to be mounted in jail? > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Hi, > > Do anybody have concerns if I would commit this? > > Index: sys/fs/tmpfs/tmpfs_vfsops.c > =================================================================== > - --- sys/fs/tmpfs/tmpfs_vfsops.c (revision 254663) > +++ sys/fs/tmpfs/tmpfs_vfsops.c (working copy) > @@ -420,4 +420,4 @@ struct vfsops tmpfs_vfsops = { > .vfs_statfs = tmpfs_statfs, > .vfs_fhtovp = tmpfs_fhtovp, > }; > - -VFS_SET(tmpfs_vfsops, tmpfs, 0); > +VFS_SET(tmpfs_vfsops, tmpfs, VFCF_JAIL); > > Cheers, > - -- > Xin LI https://www.delphij.net/ > FreeBSD - The Power to Serve! Live free or die > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.21 (FreeBSD) > > iQEcBAEBCgAGBQJSFmNRAAoJEG80Jeu8UPuzhFMH/2jligxAHwhYCbaYe43d8XXd > 8ljxmusiVWLTwsjhcZRs0Pg56BSPFR2yMbf1rLgQQCc1HpIK82N9zd3hfDoSZTM3 > fhY+gB+M3aMfQ3A0lGzpCckFdj7Dlyr+drXuVeKsTCEdM7U82/GRBq/wkI8OGft4 > kCd9kmpiupFL5WmboBJNjC1wSgn0TYeGXazkTY9K4n0HmZP+306xf6ABHEkPO5XI > nJuGsq8u2MhBmet4Cm38dGJGXym5mWRkU/i+YmgDTCVWbdKwILtEHQyq55krSPkP > p85ntduffcAwcy8Yl8facveYq+pybQKO9pEP8hUMZIN0bLPCM01FQl5x4vbyFzc= > =w8tX > -----END PGP SIGNATURE----- > _______________________________________________ > freebsd-security@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-security > To unsubscribe, send any mail to > "freebsd-security-unsubscribe@freebsd.org" Xin Li, I can envision the use of tmpfs without providing access to mounting other devices within a jail context. It would be better if this feature had its own sysctl to control the jail's state, particularly as a DOS could "inadvertently" be introduced, per Kib's earlier point. Other devices-types have additional mitigation strategies, such as exclusion via dev.rules which tmpfs doesn't have. Regards, Dewayne.