qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: "Daniel P. Berrange" <berrange@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: -enablefips
Date: Tue, 23 Jun 2020 23:51:09 -0400	[thread overview]
Message-ID: <7816f22f-2872-06ef-f7ef-40add5a34040@redhat.com> (raw)

I never knew what this option did, but the answer is ... strange!

It's only defined for linux, in os-posix.c. When called, it calls
fips_set_state(true), located in osdep.c.

This will read /proc/sys/crypto/fips_enabled and set the static global
'fips_enabled' to true if this setting is on.

(Tangent: what does *this* setting actually control? Should QEMU
meaningfully change its behavior when it's set?)

This static global is exposed via the getter fips_get_state(). This
function is called only by vnc.c, and appears to disable the use of the
password option for -vnc.

This seems very high-level and abstract for something that ultimately
only disables VNC password authentication. Is this misleadingly abstract?

The docs state:
"enable FIPS 140-2 compliance"

Like hell it does.

Can we deprecate this? It was added in 2012 and never seemed to pursue
the mission laid out in the help file. If we do still want it, the
documentation should be changed dramatically to reflect what it actually
does.

This is so at risk of bit-rot, and a misleading crypto flag is certainly
worse than no crypto flag. I think it should just go.

(If we really do want to keep it, it should probably go under -global
somewhere instead to help reduce flag clutter, but we'd need to have a
chat about what fips compliance means for literally every other spot in
QEMU that is capable of using or receiving a cleartext password.)

--js



             reply	other threads:[~2020-06-24  3:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24  3:51 John Snow [this message]
2020-06-24  6:49 ` -enablefips Gerd Hoffmann
2020-06-24  8:34   ` -enablefips Markus Armbruster
2020-06-24  8:58   ` -enablefips Daniel P. Berrangé
2020-06-24 15:09   ` -enablefips John Snow
2020-06-24  9:05 ` -enablefips 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=7816f22f-2872-06ef-f7ef-40add5a34040@redhat.com \
    --to=jsnow@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.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).