Received: from eggs.gnu.org ([140.186.70.92]:53791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDAx4-0005Yp-CC for qemu-devel@nongnu.org; Mon, 10 Oct 2011 04:11:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDAx2-0003ui-Ts for qemu-devel@nongnu.org; Mon, 10 Oct 2011 04:11:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDAx2-0003tU-Mm for qemu-devel@nongnu.org; Mon, 10 Oct 2011 04:11:08 -0400 From: Markus Armbruster References: <201109281949.34532.mohan@in.ibm.com> <20110928145906.GT21102@redhat.com> <201109292342.47489.mohan@in.ibm.com> <20110930095615.GB13701@redhat.com> Date: Mon, 10 Oct 2011 10:10:23 +0200 In-Reply-To: <20110930095615.GB13701@redhat.com> (Daniel P. Berrange's message of "Fri, 30 Sep 2011 10:56:15 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [RFC] Adding new filesystem 'proxy' to 9p List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: libvir-list@redhat.com, "M. Mohan Kumar" , qemu-devel@nongnu.org, Stefan Hajnoczi "Daniel P. Berrange" writes: > On Thu, Sep 29, 2011 at 11:42:47PM +0530, M. Mohan Kumar wrote: >> On Wednesday, September 28, 2011 08:29:06 PM Daniel P. Berrange wrote: [...] >> > If we assume that QEMU gets exploited, and that QEMU can find some flaw >> > in the proxy_helper that it can exploit, what damage can the proxy_helper >> > do ? Clearly we want it to not be able to read/write any files other >> > than those exported, even when it becomes compromised, ideally also >> > without requiring SELinux/AppArmour to make it safe. If proxy_helper >> > is running as root with full capabilities, it can trivially escape >> > the chroot[1], so this isn't all that nice for overall system security. >> >> When proxy helper process is forked, its made sure that all open file >> descriptor are closed except the socket descriptor, so that proxy helper can't >> escape chroot jail. > > Unfortunately that is not sufficient. Even if you have closed all > file descriptors except the socket, you can still escape the chroot > jail. There is a nice demo program for escaping from a chroot on > this webpage: > > http://www.bpfh.net/simes/computing/chroot-break.html [...] > Basically if the process inside the chroot, is still running as > root, then it is not securely contained. As Alan Cox observed, "chroot is not and never has been a security tool." It's a tool to configure the root of absolute path names. [...]