From: David Windsor <dwindsor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>,
Joshua Brindle <jbrindle-5TQdPaFcblfQT0dZR+AlfA@public.gmane.org>
Cc: kvm-devel
<kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
David Windsor <dwindsor-5TQdPaFcblfQT0dZR+AlfA@public.gmane.org>,
selinux <selinux-+05T5uksL2qpZYMLLGbcSA@public.gmane.org>
Subject: Re: [RFC][PATCH 00/01]qemu VM entrypoints
Date: Sun, 22 Jul 2007 16:22:57 -0400 [thread overview]
Message-ID: <C2C934E1.3709%dwindsor@gmail.com> (raw)
In-Reply-To: <46A3AB09.3090800-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
On 7/22/07 3:07 PM, "Anthony Liguori" <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org> wrote:
> Joshua Brindle wrote:
>> James Morris wrote:
>>
>>> On Sat, 21 Jul 2007, Anthony Liguori wrote:
>>>
>>>
>>>> Can you already write an selinux policy that changes the label of a
>>>> process when it open()s a different file?
>>>>
>>> No, and you normally want to do this over an exec anyway, to
>>> ensure the new execution state is clean.
>>>
>>>
>>
>> This is correct and the object model being proposed isn't just about
>> opening files.
>>
>> Anthony - There are several userspace object managers for SELinux,
>> basically they manage resources that are too abstract for the kernel to
>> manage. These include DBUS connections, X windows/pixmaps/cursors/etc,
>> postgresql tables and rows, etc. SELinux is designed to designed to have
>> non-centralized enforcement of the policy (but centralized decision
>> making). In this case the object model isn't just about opening a file,
>> its about lauching and restricting a vm based on an abstract resource,
>> in this case a virtual disk file, that the kernel can't differenciate
>> from any other file.
>>
>> The reason for this abstraction is simple, think about all the files
>> that qemu has to open that aren't disk files. For example, if you have 3
>> vm's, unclass, secret, top secret, those qemu processes still have to
>> share resources, library files, configuration files, devices,
>> potentially log, pid etc. If someone could manage to get a top secret
>> disk labeled lib_t they could boot any of those vm's with that disk
>> image (using snapshot or some feature to prevent write attempts on it),
>> and disclose top secret data where it shouldn't be disclosed.
>>
>
> The only way that the VM could possible see the top secret data is if
> the disk file was readable by the QEMU process running the secret
> guest. That's the security problem. You address this "attack" by
> simply not letting the user that launched the QEMU process have read
> access to the top secret disk file. Why would you ever want to allow
> the QEMU process that's running a "secret" domain to have any read
> access to top secret files?
>
There will be some cases where VMs of different integrity levels have
file:read permissions in common for certain files, for example, shared
libraries, or other resources which may be explicitly shared.
The vm:entrypoint is similar in nature to the file:entrypoint permission.
For files, only a certain trusted codebase is authorized in policy as an
entrypoint into a certain domain; this codebase is given file:entrypoint
permission wrt the target domain. Similarly, for virtual machines, it would
be nice to authorize in policy a certain disk image as an entrypoint into a
certain domain. It would also be nice to have SELinux policy decide which
domain a VM will execute in not only based on the type of the virtual disk,
but on the type of the process loading the virtual disk. This can be
accomplished using the vm:entrypoint permission and type_transition rules.
If the patch that I posted is moved to libvirt, no modification of qemu is
necessary, and those wishing to use qemu (and likely other userspace
backends later) would just link against libvirt and libselinux.
Thanks,
David Windsor
> Regards,
>
> Anthony Liguori
>
>> With David's object model this kind of attack can be prevented because
>> virtual disk files aren't 'just files' to qemu, they are an abstract
>> resource that means more than just a regular file, just like a database
>> file is more than just a regular file for SE-Postgresql.
>>
>>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
next prev parent reply other threads:[~2007-07-22 20:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-20 19:32 [RFC][PATCH 00/01]qemu VM entrypoints David Windsor
[not found] ` <C2C68600.366D%dwindsor-5TQdPaFcblfQT0dZR+AlfA@public.gmane.org>
2007-07-20 20:03 ` Anthony Liguori
[not found] ` <46A1151F.7020502-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-07-20 21:55 ` David Windsor
2007-07-20 22:19 ` [kvm-devel] " Anthony Liguori
2007-07-20 20:11 ` Daniel P. Berrange
[not found] ` <20070720201101.GC12218-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2007-07-20 20:30 ` James Morris
2007-07-20 20:38 ` Daniel P. Berrange
2007-07-20 20:46 ` Anthony Liguori
[not found] ` <46A11F1A.2080004-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-07-20 22:42 ` James Morris
2007-07-20 22:53 ` Anthony Liguori
[not found] ` <46A13CDB.7020900-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-07-20 23:33 ` James Morris
2007-07-21 2:48 ` David Windsor
2007-07-21 6:21 ` Avi Kivity
[not found] ` <46A1A5E9.7000807-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-21 6:53 ` David Windsor
[not found] ` <C2C7258F.36C9%dwindsor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2007-07-21 15:54 ` Anthony Liguori
[not found] ` <46A22C37.5030004-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-07-21 17:55 ` James Morris
2007-07-21 19:01 ` Joshua Brindle
[not found] ` <6FE441CD9F0C0C479F2D88F959B01588DE1B1E-Lp/cVzEoVybUo1n7N8X6UhN0Am9MfdqnVpNB7YpNyf8@public.gmane.org>
2007-07-22 19:07 ` Anthony Liguori
[not found] ` <46A3AB09.3090800-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
2007-07-22 20:22 ` David Windsor [this message]
2007-07-22 17:39 ` David Windsor
2007-07-20 21:57 ` David Windsor
[not found] ` <25a1d91b0707201457m6865a505maf93d22c5c28f0cc-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-07-20 23:50 ` Daniel P. Berrange
[not found] ` <20070720235007.GA1595-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2007-07-21 1:41 ` James Morris
2007-07-20 20:35 ` James Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C2C934E1.3709%dwindsor@gmail.com \
--to=dwindsor-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org \
--cc=dwindsor-5TQdPaFcblfQT0dZR+AlfA@public.gmane.org \
--cc=jbrindle-5TQdPaFcblfQT0dZR+AlfA@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=selinux-+05T5uksL2qpZYMLLGbcSA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox