From owner-freebsd-security@FreeBSD.ORG Mon May 9 19:28:59 2011 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A63A0106566B for ; Mon, 9 May 2011 19:28:59 +0000 (UTC) (envelope-from jamie@bishopston.net) Received: from pacha.mail.bishopston.net (pacha.mail.bishopston.net [66.148.74.41]) by mx1.freebsd.org (Postfix) with ESMTP id 878008FC15 for ; Mon, 9 May 2011 19:28:58 +0000 (UTC) X-Catflap-Envelope-From: Received: from catflap.bishopston.net (jamie@localhost [127.0.0.1]) by catflap.bishopston.net (8.14.4/8.14.3) with ESMTP id p49Bt701053329; Mon, 9 May 2011 12:55:07 +0100 (BST) (envelope-from jamie@catflap.bishopston.net) Received: (from jamie@localhost) by catflap.bishopston.net (8.14.4/8.12.9/Submit) id p49Bt604053259; Mon, 9 May 2011 12:55:06 +0100 (BST) From: Jamie Landeg Jones Message-Id: <201105091155.p49Bt604053259@catflap.bishopston.net> Date: Mon, 09 May 2011 12:55:06 +0100 Organization: http://www.bishopston.com/jamie/ To: jamie@bishopston.net, edhoprima@gmail.com References: <4DC40E21.6040503@gmail.com> <4DC4102E.8000700@gmail.com> <201105072231.p47MVktY035491@catflap.bishopston.net> In-Reply-To: User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (catflap.bishopston.net [127.0.0.1]); Mon, 09 May 2011 12:55:07 +0100 (BST) X-Virus-Scanned: clamav-milter 0.97 at catflap.bishopston.net X-Virus-Status: Clean Cc: freebsd-security@freebsd.org, feld@feld.me, utisoft@gmail.com Subject: Re: Rooting FreeBSD , Privilege Escalation using Jails =?iso-8859-1?q?=28P=C3=AF=C2=BF=C2=BDtur=29?= X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 May 2011 19:28:59 -0000 > > A jail won't work for not-root users if the jail root directory is chmod 700 - although > > there is obviously a 'chroot' running withing the jail, the jailed user still needs > > to have read permission from the hosts / -- chmod 700 therefore locks all non-root > > users out. > > > > It's weird - I don't remember having such problem after setting jails' > root directory permission to 700. I don't have the system anymore so I > can't verify it just yet. I just tried it again (Freebsd 8.2) and I am wrong. Setting 700 on the jail root does indeed mess things up. But setting it on the parent (e.g. /usr/jails), and things are fine. Stupidly of me, that makes perfect sense. The non-privileged user needs read access to the jails "/" Sorry for the spam