From nobody Sat Feb 7 09:04:17 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611940307; cv=none; d=zohomail.com; s=zohoarc; b=mjZyeL0oFmLtTRvu6UTWfLOkI2U8wxZoAkR7WVyn09a7D29h1g+ZbJ4rVcl3K5T4QfcAso9Laz6UNc+uCAX/WGy6dDEsYWD+pfXsCuFTlhN6YohpKAkcPkykYN83ArQiKbfVHfTRod01U9K6iwOQkHNjYNIkNEDmBT83lM72zbs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611940307; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=n6JYP9W32stwdwNTOMk8OrBP4nVF1AJX/Q/uK1qg7Dw=; b=idkcyG86W+ugncUAxGcLbyNIunhazEQ/bmVELVMJjS/LF6ijfsGHgUPViaiq8Aq4Ou+aC5NE8jiDIp+nHyt4qux/05EDR2MYIOHBzNr4bRD9fl8Ki8Qk+K55xpQDa1A0KsRuT4V+6gI8PcfWCeno+MFCz7xifqven2jdUA6gR3M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1611940307306103.43741482031203; Fri, 29 Jan 2021 09:11:47 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-10-Z060i-aWPCCkdpBpcafkjQ-1; Fri, 29 Jan 2021 12:11:43 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 47E0E1007461; Fri, 29 Jan 2021 17:11:37 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2159C10023B8; Fri, 29 Jan 2021 17:11:37 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id DAC005003F; Fri, 29 Jan 2021 17:11:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10THBZh4018778 for ; Fri, 29 Jan 2021 12:11:35 -0500 Received: by smtp.corp.redhat.com (Postfix) id A19BD63633; Fri, 29 Jan 2021 17:11:35 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-115-94.ams2.redhat.com [10.36.115.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 95AF95D705; Fri, 29 Jan 2021 17:11:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611940305; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=n6JYP9W32stwdwNTOMk8OrBP4nVF1AJX/Q/uK1qg7Dw=; b=VtEjOMFpBHw6bJLcawaARtg0BtzSCcL56MtiU2dASK0cKpMmt/PjdK8OpotzoB7YvvPNGM kyYxXxpH2K2S+rVBLpDsRyB/31jMoW87dif54FaoL9dQolqgu9wuCOZauG3GemAOaClJfa 5jcM95Xyuk7F1o0WUGvqcMqPm1zy+T8= X-MC-Unique: Z060i-aWPCCkdpBpcafkjQ-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 05/13] os: deprecate the -enable-fips option and QEMU's FIPS enforcement Date: Fri, 29 Jan 2021 17:10:54 +0000 Message-Id: <20210129171102.4109641-6-berrange@redhat.com> In-Reply-To: <20210129171102.4109641-1-berrange@redhat.com> References: <20210129171102.4109641-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Kevin Wolf , Thomas Huth , qemu-block@nongnu.org, libvir-list@redhat.com, Max Reitz , Gerd Hoffmann , Paolo Bonzini , John Snow X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) 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 Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrang=C3=A9 --- docs/system/deprecated.rst | 12 ++++++++++++ os-posix.c | 3 +++ 2 files changed, 15 insertions(+) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 9de663526a..6ac757ed9f 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -134,6 +134,18 @@ Boolean options such as ``share=3Don``/``share=3Doff``= could be written in short form as ``share`` and ``noshare``. This is now deprecated and will cause a warning. =20 +``--enable-fips`` (since 6.0) +''''''''''''''''''''''''''''' + +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 ------------------------------------ =20 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 --=20 2.29.2