Received: from [140.186.70.92] (port=50509 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OPXzc-00084y-MD for qemu-devel@nongnu.org; Fri, 18 Jun 2010 05:36:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OPXzb-0001SZ-Ih for qemu-devel@nongnu.org; Fri, 18 Jun 2010 05:36:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3581) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OPXzb-0001SU-Bn for qemu-devel@nongnu.org; Fri, 18 Jun 2010 05:36:07 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] RFC v3: blockdev_add & friends, brief rationale, QMP docs References: Date: Fri, 18 Jun 2010 11:36:02 +0200 In-Reply-To: (Stefan Hajnoczi's message of "Fri, 18 Jun 2010 09:16:24 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Christoph Hellwig , qemu-devel@nongnu.org, Luiz Capitulino , Avi Kivity , Gerd Hoffmann Stefan Hajnoczi writes: > On Fri, Jun 18, 2010 at 8:27 AM, Markus Armbruster wr= ote: >> Stefan Hajnoczi writes: >>> On Thu, Jun 17, 2010 at 1:49 PM, Markus Armbruster = wrote: >>>> Stefan Hajnoczi writes: >>>>> On Wed, Jun 16, 2010 at 6:27 PM, Markus Armbruster wrote: >>>> To let users ask for this explicitely, we could have pseudo-format >>>> "auto". >>>> >>>> We also need a pseudo-format "probe", which guesses the format from the >>>> image contents. =C2=A0Can't be made the default, because it's insecure. >>> >>> In which scenario is probing the image format a security issue? =C2=A0I= 'm >>> trying to think up scenarios where a cloud user modifies the guest >>> disk image and gets QEMU to re-open the image file as another format, >>> perhaps this would make the cloud owner/admin unhappy. =C2=A0I don't se= e a >>> threat except for image format drivers have security bugs (corrupt >>> images leading to arbitrary code execution). >> >> User creates a raw image file. >> >> VM starts. =C2=A0Image file gets probed, it's raw. =C2=A0Guest has acces= s to the >> complete file. >> >> Guest writes a valid QCOW2 image to it, chosen to include the full >> backing file in the resulting image contents. =C2=A0Set the backing file= to >> /secret/treasure. >> >> Reboot VM. =C2=A0Image file gets probed, it's qcow2. =C2=A0Backing file = gets >> probed, it's raw. =C2=A0Guest has access to the contents of QCOW2 image. >> This includes the backing file. =C2=A0Oops. > > I thought selinux/svirt was supposed to secure QEMU processes and > ensure they only have access to the resources they need? If the > backing file doesn't belong to me then my QEMU process shouldn't be > able to open it. Yes, SELinux will protect you from security holes in applications. Protecting from !=3D fixing of :)