Re: qemu-ga guest-exec & SELinux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 20, 2022 at 01:44:05PM +0400, Marc-André Lureau wrote:
> Hi!
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=2093355 ("AVCs when trying to
> execute a command through qemu-ga ("guest-exec" command)") describes an
> issue with fedora/rhel SELinux rules, where some program executions are
> denied.
> 
> qemu-ga has "virt_qemu_ga_t" context, and is not allowed to execute
> binaries that are not "bin_t", iiuc. The suggestion from Renaud Métrich is
> for qemu-ga exec command to launch the user program through an helper
> program that would have the virt_qemu_ga_unconfined_exec_t context, and
> appropriate rules in selinux (similar to fsfreeze-hook rules), so any
> program can be executed. qemu-ga would thus ship and use that helper, in
> all OS, to avoid varying code paths.
> 
> Does that sound reasonable or should we try to find a solution with SELinux
> rules instead?

I thought was did not allow qemu-ga to execute binaries at all, regardless
of whether they're bin_t or not.  The 'guest-exec' command is essentially
a giant hole that defeats the purpose of confining qemu-ga with SELinux
at all IMHO.

IMHO execution of external commands should only be allowed after toggling
a SELinux boolean tunable.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
_______________________________________________
selinux mailing list -- selinux@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to selinux-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/selinux@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux