From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: selinux@lists.fedoraproject.org, QEMU <qemu-devel@nongnu.org>,
rmetrich@redhat.com
Subject: Re: qemu-ga guest-exec & SELinux
Date: Mon, 20 Jun 2022 11:06:19 +0100 [thread overview]
Message-ID: <YrBGm4Aar1DMmy1H@redhat.com> (raw)
In-Reply-To: <CAJ+F1C+8y2yNjf4GHirtHSxGASPHy9n7u++39WDhcgDn2p_M8Q@mail.gmail.com>
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 :|
next prev parent reply other threads:[~2022-06-20 10:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-20 9:44 qemu-ga guest-exec & SELinux Marc-André Lureau
2022-06-20 10:06 ` Daniel P. Berrangé [this message]
2022-06-21 8:42 ` Renaud Métrich
2022-06-21 9:30 ` Daniel P. Berrangé
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=YrBGm4Aar1DMmy1H@redhat.com \
--to=berrange@redhat.com \
--cc=marcandre.lureau@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=rmetrich@redhat.com \
--cc=selinux@lists.fedoraproject.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;
as well as URLs for NNTP newsgroup(s).