From owner-freebsd-security@FreeBSD.ORG Tue May 10 10:57:04 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 489721065670 for ; Tue, 10 May 2011 10:57:04 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 095CF8FC21 for ; Tue, 10 May 2011 10:57:03 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 806875DC2; Tue, 10 May 2011 10:37:46 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.4/8.14.4) with ESMTP id p4AAbi82020052; Tue, 10 May 2011 10:37:44 GMT (envelope-from phk@critter.freebsd.dk) To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 10 May 2011 12:28:28 +0200." <86zkmu26k3.fsf@ds4.des.no> Content-Type: text/plain; charset=ISO-8859-1 Date: Tue, 10 May 2011 10:37:44 +0000 Message-ID: <20051.1305023864@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Jamie Landeg Jones , Jason Hellenthal , feld@feld.me, Edho P Arief , freebsd-security@freebsd.org, utisoft@gmail.com Subject: Re: Rooting FreeBSD , Privilege Escalation using Jails (P??????tur) 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: Tue, 10 May 2011 10:57:04 -0000 In message <86zkmu26k3.fsf@ds4.des.no>, =?utf-8?Q?Dag-Erling_Smørgrav?= wr ites: >Jason Hellenthal writes: >> Do you know if there is a way that chmod on / from within the jail could > >> be prevented easily without breaking something ? Maybe not failing but >> falling though and return 0 for any operation with the sole argument of /. > >Not without adding explicit checks in the kernel. I identified this issue back when I implemented jails and though long and hard about adding a kernel hack to paste over this. My conclusion was that there were not enough justification for it, based on the usage model envisioned then: virtual-machines-light. Gettys first rule says: 1. Do not add new functionality unless an implementor cannot complete a real application without it. and I think we should stick to that before adding more or less random pieces of magic to the kernel. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.