From: Thomas Huth <thuth@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: libvir-list@redhat.com, Paolo Bonzini <pbonzini@redhat.com>,
John Snow <jsnow@redhat.com>
Subject: Re: [PATCH] os: deprecate the -enable-fips option and QEMU's FIPS enforcement
Date: Wed, 21 Oct 2020 07:54:35 +0200 [thread overview]
Message-ID: <68011f67-a938-c004-0c59-2a4de09c896e@redhat.com> (raw)
In-Reply-To: <20201020162211.401204-1-berrange@redhat.com>
On 20/10/2020 18.22, Daniel P. Berrangé wrote:
> The -enable-fips option was added a long time ago to prevent the use of
> single DES when VNC when FIPS mode is enabled. It should never have been
> added, because apps are supposed to unconditionally honour FIPS mode
> based on the '/proc/sys/crypto/fips_enabled' file contents.
>
> In addition there is more to achieving FIPS compliance than merely
> blocking use of certain algorithms. Those algorithms which are used
> need to perform self-tests at runtime.
>
> QEMU's built-in cryptography provider has no support for self-tests,
> and neither does the nettle library.
>
> If QEMU is required to be used in a FIPS enabled host, then it must be
> built with the libgcrypt library enabled, which will unconditionally
> enforce FIPS compliance in any algorithm usage.
>
> Thus there is no need to keep either the -enable-fips option in QEMU, or
> QEMU's internal FIPS checking methods.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> docs/system/deprecated.rst | 11 +++++++++++
> os-posix.c | 3 +++
> 2 files changed, 14 insertions(+)
>
> diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
> index 905628f3a0..faa2bc49b1 100644
> --- a/docs/system/deprecated.rst
> +++ b/docs/system/deprecated.rst
> @@ -158,6 +158,17 @@ devices. It is possible to use drives the board doesn't pick up with
> -device. This usage is now deprecated. Use ``if=none`` instead.
>
>
Nit: The two empty lines should be below the new entry (i.e. before the
"QMP" title below), not before it.
> +``--enable-fips`` (since 5.2)
> +
> +This option restricts usage of certain cryptographic algorithms when
> +the host is operating in FIPS mode.
> +
> +If FIPS compliance is required, QEMU should be built with the ``libgcrypt``
> +library enabled as a cryptography provider.
> +
> +Neither the ``nettle`` library, or the built-in cryptography provider are
> +supported on FIPS enabled hosts.
> +
> QEMU Machine Protocol (QMP) commands
> ------------------------------------
> diff --git a/os-posix.c b/os-posix.c
> index 1de2839554..a6846f51c1 100644
> --- a/os-posix.c
> +++ b/os-posix.c
> @@ -153,6 +153,9 @@ int os_parse_cmd_args(int index, const char *optarg)
> break;
> #if defined(CONFIG_LINUX)
> case QEMU_OPTION_enablefips:
> + warn_report("-enable-fips is deprecated, please build QEMU with "
> + "the `libgcrypt` library as the cryptography provider "
> + "to enable FIPS compliance");
> fips_set_state(true);
> break;
> #endif
With the nit fixed:
Reviewed-by: Thomas Huth <thuth@redhat.com>
prev parent reply other threads:[~2020-10-21 5:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-20 16:22 [PATCH] os: deprecate the -enable-fips option and QEMU's FIPS enforcement Daniel P. Berrangé
2020-10-20 17:22 ` Paolo Bonzini
2020-10-21 8:38 ` Daniel P. Berrangé
2020-10-21 9:51 ` Paolo Bonzini
2020-10-21 10:17 ` Daniel P. Berrangé
2020-10-21 11:47 ` Paolo Bonzini
2020-10-22 14:04 ` John Snow
2020-10-21 5:54 ` Thomas Huth [this message]
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=68011f67-a938-c004-0c59-2a4de09c896e@redhat.com \
--to=thuth@redhat.com \
--cc=berrange@redhat.com \
--cc=jsnow@redhat.com \
--cc=libvir-list@redhat.com \
--cc=pbonzini@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).