From owner-freebsd-jail@freebsd.org Mon Mar 14 21:07:45 2016 Return-Path: Delivered-To: freebsd-jail@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A748AD15D7 for ; Mon, 14 Mar 2016 21:07:45 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DA76D17 for ; Mon, 14 Mar 2016 21:07:44 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 91AC722B13 for ; Mon, 14 Mar 2016 17:07:42 -0400 (EDT) Received: from web3 ([10.202.2.213]) by compute5.internal (MEProxy); Mon, 14 Mar 2016 17:07:42 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Ax0qXg5Lr28yYsH Tr8SbMU0Ue+o=; b=C9xFer/DMuH4EpsDXWhrK2USgaLJNhsw2Pp5t9nC1n/euPE coGOTNLEUczq7YYQyIDFRDMVvWAF2TzYxBS9/cUcIFFbsmXuWV6xHgKQoRVPPhoN QnVjSkVHrlBHjIJs3kPsMlmlF6c/++aUt6wuWlhmcnvQE2BpMWeamGt2D3g8= Received: by web3.nyi.internal (Postfix, from userid 99) id 664B11065B7; Mon, 14 Mar 2016 17:07:42 -0400 (EDT) Message-Id: <1457989662.568170.549069906.791C2D05@webmail.messagingengine.com> X-Sasl-Enc: t5F8F1k5rtNNrtojVaEPJWyw/tvB1OO2X5PtWtgiKUW8 1457989662 From: Mark Felder To: James Gritton , freebsd-jail@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-da7163a6 In-Reply-To: <0ad738494152d249f3bbe3b722a46bd2@gritton.org> References: <0ad738494152d249f3bbe3b722a46bd2@gritton.org> Subject: Re: SHM objects cannot be isolated in jails, any evolution in future FreeBSD versions? Date: Mon, 14 Mar 2016 16:07:42 -0500 X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2016 21:07:45 -0000 On Sat, Mar 12, 2016, at 11:42, James Gritton wrote: > On 2016-03-12 04:05, Simon wrote: > > The shm_open()(2) function changed since FreeBSD 7.0: the SHM objects > > path are now uncorrelated from the physical file system to become just > > abstract objects. Probably due to this, the jail system do not provide > > any form of filtering regarding shared memory created using this > > function. Therefore: > > > > - Anyone can create unauthorized communication channels between jails, > > - Users with enough privileges in any jail can access and modify any > > SHM objects system-wide, ie. shared memory objects created in any > > other jail and in the host system. > > > > I've seen a few claims that SHM objects were being handled differently > > whether they were created inside or outside a jail. However, I tested > > on FreeBSD 10.1 and 9.3 but found no evidence of this: both version > > were affected by the same issue. > > > > A reference of such claim: > > https://lists.freebsd.org/pipermail/freebsd-ports-bugs/2015-July/312665.html > > > > My initial post on FreeBSD forum discussing the issue with more > > details: https://forums.freebsd.org/threads/55468/ > > > > Currently, there does not seem to be any way to prevent this. > > > > I'm therefore wondering if there are any concrete plans to change this > > situation in future FreeBSD versions? Be able to block the currently > > free inter-jail SHM-based communication seems a minimum, however such > > setting would also most likely prevent SHM-based application to work. > > > > Using file based SHM objects in jails seemed a good ideas but it does > > not seem implemented this way, I don't know why. Is this planned, or > > are there any greater plans ongoing also involving IPC's similar > > issue? > > There are no concrete plans I'm aware of, but it's definitely a thing > that should be done. How about filing a bug report for it? You've > already got a good write-up of the situation. > Both this and SYSV IPC jail support[1] are badly needed. [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=48471 -- Mark Felder ports-secteam member feld@FreeBSD.org