Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6427516rwl; Thu, 29 Dec 2022 12:40:45 -0800 (PST) X-Google-Smtp-Source: AMrXdXvX0ReDtwM5H1ww9DRRIzol+HQ6PwkKs9cr4dlXfG4IXJxBaVePoSyv9+YMjHA1hEniyN66 X-Received: by 2002:a17:906:19db:b0:7c0:8578:f4c0 with SMTP id h27-20020a17090619db00b007c08578f4c0mr23036652ejd.67.1672346445685; Thu, 29 Dec 2022 12:40:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672346445; cv=none; d=google.com; s=arc-20160816; b=tpUPPW5JxJDPrGW5A3HWhmPmqmEI1SDS5dFAQ5igmSr/bA+f7mtB1dBpqK0+Kgv9xd 8cl23AW+AtXRiy1+vN/QKgpsxnc25ZVrc86AYJ16XI2vK+ZpYMzm+9sqFxg8cibqzbfa JTGCHYx8RdmC4aYwFlcTi7s8pWHNWQxJ9GIU0mKapgqFet3g37dY37VB6xpT4Ymm3aPV WMSa+DUddyGYMR8q0Zko0A+WpoU+drGxcwBeLWFHnDRo2YhXHpEgnlOXDPYWm8n9kLLI 511M6px7IbSrQIjB0vLmggF1lScRlRB8mvu8DcnMkFgZz7Gu8ApNeNrtjzspmdGlKhiF zLLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5DvSnehV36VU/oOzzLcli5gwI8QWk8eQIWnhStrPh7c=; b=huuUPisvAFpoHK4ZmY1dfE7hulItYbGppizvAUJEAiiu9XbPoG2r0CWAocodbkqdOJ BNokM4vMRX4MR7zd++TKwebePHRCd0SxHvC4Jy0DgnQ/7Pqt6F6LDG78voYKfEkz0v7Z Ml2I5DGz25LIzntH1S4RrxVEPQ53+eIm91rDuULYN1jlaH+K8oa2ddfXIMPv4RgKNU4G 9/2CV9tqpjULXAVYWz67HY7Eysb6Wi9HqFfe2k9MoXfsEAvHPzH+4ypZbGahAaRghDto qNZxBwEYtMKNa8hleMTrlnPeWv5vT6JFsHFZZJYQ4qAggjGHDEv2JnaBEHhBLprLjoTX UDpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Ywh/rEnt"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb25-20020a1709076d9900b007c4f78e6104si15992889ejc.408.2022.12.29.12.40.21; Thu, 29 Dec 2022 12:40:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Ywh/rEnt"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234053AbiL2Uja (ORCPT + 99 others); Thu, 29 Dec 2022 15:39:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234117AbiL2Uis (ORCPT ); Thu, 29 Dec 2022 15:38:48 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF48717045 for ; Thu, 29 Dec 2022 12:37:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672346276; h=from:from: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; bh=5DvSnehV36VU/oOzzLcli5gwI8QWk8eQIWnhStrPh7c=; b=Ywh/rEntRetFi2EBN3Qkq6m/ok93WYfTdgzRCpxDGAhzX2JFk4/v7sH06Nit1qMTb3p2ml nKiZF0pSHLF2w0s0KGoqK6NqOdy9AsWwg5aUrd9P1XFJzFjFiUegPeHoKlSmwpL8PIQHE5 hp4xEHw7S7HzM96m7UBzRgvHu6gFsaY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-125-EGcJBK5tNIC3JtoYLF_WqQ-1; Thu, 29 Dec 2022 15:37:53 -0500 X-MC-Unique: EGcJBK5tNIC3JtoYLF_WqQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2C64B1C05131; Thu, 29 Dec 2022 20:37:53 +0000 (UTC) Received: from rules.brq.redhat.com (ovpn-208-2.brq.redhat.com [10.40.208.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA295112132C; Thu, 29 Dec 2022 20:37:50 +0000 (UTC) From: Vladis Dronov To: Herbert Xu , "David S . Miller" Cc: Nicolai Stange , Elliott Robert , Stephan Mueller , Eric Biggers , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Vladis Dronov Subject: [PATCH v2 5/6] crypto: testmgr - disallow plain ghash in FIPS mode Date: Thu, 29 Dec 2022 21:37:07 +0100 Message-Id: <20221229203708.13628-6-vdronov@redhat.com> In-Reply-To: <20221229203708.13628-1-vdronov@redhat.com> References: <20221229203708.13628-1-vdronov@redhat.com> MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Nicolai Stange ghash may be used only as part of the gcm(aes) construction in FIPS mode. Since commit d6097b8d5d55 ("crypto: api - allow algs only in specific constructions in FIPS mode") there's support for using spawns which by itself are marked as non-approved from approved template instantiations. So simply mark plain ghash as non-approved in testmgr to block any attempts of direct instantiations in FIPS mode. Signed-off-by: Nicolai Stange Signed-off-by: Vladis Dronov Reviewed-by: Eric Biggers --- crypto/testmgr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 562463a77a76..a223cf5f3626 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -5125,7 +5125,6 @@ static const struct alg_test_desc alg_test_descs[] = { }, { .alg = "ghash", .test = alg_test_hash, - .fips_allowed = 1, .suite = { .hash = __VECS(ghash_tv_template) } -- 2.38.1