Skip to content

Commit 1663102

Browse files
committed
os: deprecate the -enable-fips option and QEMU's FIPS enforcement
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. Reviewed-by: John Snow <[email protected]> Reviewed-by: Thomas Huth <[email protected]> Signed-off-by: Daniel P. Berrangé <[email protected]>
1 parent ab366aa commit 1663102

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

docs/system/deprecated.rst

+12
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,18 @@ Boolean options such as ``share=on``/``share=off`` could be written
134134
in short form as ``share`` and ``noshare``. This is now deprecated
135135
and will cause a warning.
136136

137+
``--enable-fips`` (since 6.0)
138+
'''''''''''''''''''''''''''''
139+
140+
This option restricts usage of certain cryptographic algorithms when
141+
the host is operating in FIPS mode.
142+
143+
If FIPS compliance is required, QEMU should be built with the ``libgcrypt``
144+
library enabled as a cryptography provider.
145+
146+
Neither the ``nettle`` library, or the built-in cryptography provider are
147+
supported on FIPS enabled hosts.
148+
137149
QEMU Machine Protocol (QMP) commands
138150
------------------------------------
139151

os-posix.c

+3
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ int os_parse_cmd_args(int index, const char *optarg)
153153
break;
154154
#if defined(CONFIG_LINUX)
155155
case QEMU_OPTION_enablefips:
156+
warn_report("-enable-fips is deprecated, please build QEMU with "
157+
"the `libgcrypt` library as the cryptography provider "
158+
"to enable FIPS compliance");
156159
fips_set_state(true);
157160
break;
158161
#endif

0 commit comments

Comments
 (0)