From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
P J P <ppandit@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] doc: document that the monitor console is a privileged control interface
Date: Thu, 4 Jul 2019 09:50:16 +0100 [thread overview]
Message-ID: <20190704085016.GC20871@redhat.com> (raw)
In-Reply-To: <87k1cywznu.fsf@zen.linaroharston>
On Wed, Jul 03, 2019 at 10:56:05PM +0100, Alex Bennée wrote:
>
> Daniel P. Berrangé <berrange@redhat.com> writes:
>
> > A supposed exploit of QEMU was recently announced as CVE-2019-12928
> > claiming that the monitor console was insecure because the "migrate"
> > comand enabled arbitrary command execution for a remote attacker.
> >
> > For this to be a flaw the user launching QEMU must have configured
> > the monitor in a way that allows for other userrs to access it. The
> > exploit report quoted use of the "tcp" character device backend for
> > QMP.
> >
> > This would indeed allow any network user to connect to QEMU and
> > execute arbitrary comamnds, however, this is not a flaw in QEMU.
> > It is the normal expected behaviour of the monitor console and the
> > commands it supports. Given a monitor connection, there are many
> > ways to access host filesystem content besides the migrate command.
> >
> > The reality is that the monitor console (whether QMP or HMP) is
> > considered a privileged interface to QEMU and as such must only
> > be made available to trusted users. IOW, making it available with
> > no authentication over TCP is simply a, very serious, user
> > configuration error not a security flaw in QEMU itself.
>
> Is this the sort of thing we should emit warnings for? I guess this is a
> philosophical question as QEMU tends to err towards being taciturn on
> the command line unless something is actually wrong (and not just
> stupid).
>
> I wouldn't expect a warning for -serial mon:stdio but maybe a
> non-localhost tcp chardev for o+rw socket might be worth a mention? Of
> course this sort of sanitising of the command line options does incur
> cost and complexity in our option processing.
The challenge with issuing warnings is ensuring that we don't give
false positives, and that's pretty much impossible IMHO.
Even use of plain non-localhost TCP chardevs can be valid in some
circumstances. For example it would not be surprising to see it
used if QEMU was inside a Kubernetes container, as two containers
can communicate with each other over IP & rely on Kubernetes
networking layer to provide security
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:[~2019-07-04 8:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-03 13:54 [Qemu-devel] [PATCH] doc: document that the monitor console is a privileged control interface Daniel P. Berrangé
2019-07-03 14:24 ` Philippe Mathieu-Daudé
2019-07-03 14:30 ` Daniel P. Berrangé
2019-07-03 14:41 ` Eric Blake
2019-07-03 16:37 ` no-reply
2019-07-03 21:56 ` Alex Bennée
2019-07-04 8:50 ` Daniel P. Berrangé [this message]
2019-07-04 9:16 ` Alex Bennée
2019-07-04 9:19 ` Daniel P. Berrangé
2019-07-04 9:24 ` Alex Bennée
2019-07-04 1:33 ` no-reply
2019-07-05 7:03 ` Markus Armbruster
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=20190704085016.GC20871@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=ppandit@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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).