From: Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
To: David Windsor <dwindsor-5TQdPaFcblfQT0dZR+AlfA@public.gmane.org>
Cc: kvm-devel
<kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
Joshua Brindle <jbrindle-5TQdPaFcblfQT0dZR+AlfA@public.gmane.org>,
selinux <selinux-+05T5uksL2qpZYMLLGbcSA@public.gmane.org>
Subject: Re: [RFC][PATCH 00/01]qemu VM entrypoints
Date: Fri, 20 Jul 2007 15:03:43 -0500 [thread overview]
Message-ID: <46A1151F.7020502@codemonkey.ws> (raw)
In-Reply-To: <C2C68600.366D%dwindsor-5TQdPaFcblfQT0dZR+AlfA@public.gmane.org>
David Windsor wrote:
> Hi,
>
> After a bit more discussion about integrating SELinux and KVM, it seems that
> there is little interest in adding enforcement hooks to KVM as it stands.
> Once KVM gets some type of inter-vm communication mechanism, MAC hooks will
> probably be added in that space.
>
First, a patch like this has to go to qemu-devel.
> Until then, there seems to be interest in adding MAC controls to control VM
> management operations, such as migrating VMs, or saving/resuming VMs.
>
Why is this interesting? Is it common to modify applications like this
to have additional selinux hooks? Can you give examples?
What makes QEMU/KVM special such that it requires userspace selinux hooks?
Regards,
Anthony Liguori
> One particular aspect of VM management which may be nice to control via
> SELinux is the loading of a virtual hard disk into a VM. Currently,
> administrators would have to rely on file permissions to control which files
> could be used as a virtual hard disks. The semantics of file permissions do
> not accomplish what is needed here. A domain needs to explicitly get
> permission from the policy to both use a file as a virtual disk and to use
> the contents of that virtual disk as an "entrypoint" to the new, virtual
> machine of a different integrity level.
>
> Since there is no SELinux permission for this, I have created the vm {
> entrypoint } object class/permission pair to represent this type of access.
> Policy for allowing domain user_t to load a virtual disk of type
> qemu_virtdisk_t would look something like:
>
> allow user_t qemu_virtdisk_t:file r_file_perms;
> type_change user_t qemu_virtdisk_t:vm vm_user_t;
> allow qemu_virtdisk_t user_vm_t:vm entrypoint;
>
> Please note that this patch will only check the entrypoint permission, and
> does not actually facilitate transitioning on the type of the virtual disk.
> I want some comments before continuing with this approach.
>
> When loading a virtual disk into a VM, qemu would consult the policy to see
> essentially three things: if the current process is allowed to read the
> virtual disk file, what the type of the VM should be after loading the disk,
> and if the virtual disk is in fact allowed to serve as an entrypoint to the
> target domain.
>
> One problem with this approach is that loading a VM is not an exec-based
> operation. Dynamic transitions could be used, but could possibly be avoided
> by altering the patch to fork, then re-exec in the target domain.
>
> This patch applies cleanly to kvm-userspace trunk.
>
> Thoughts?
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> kvm-devel mailing list
> kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2007-07-20 20:03 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 [this message]
[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
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=46A1151F.7020502@codemonkey.ws \
--to=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