Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp6393363rwj; Wed, 21 Dec 2022 15:06:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXsyfxCvb2LjxWWKrs06RUsWp2f1bzYhqfVJToZBuYecgJFkcsfmZDmHsSDCF9JVJ5HAvbjN X-Received: by 2002:a05:6a20:8f26:b0:ad:db18:6d0d with SMTP id b38-20020a056a208f2600b000addb186d0dmr5692859pzk.59.1671664017756; Wed, 21 Dec 2022 15:06:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671664017; cv=none; d=google.com; s=arc-20160816; b=oGa6QrY9x4vKyvN/RmwFZQyTGAM1+pYlH0xeeIAakcUbb3HJ4+DsPYvL+uTVTRIDDj FsXS06wWrKp9yGezUmVXuGpYPWiz4Iq2gcTR+sSghliQcqLOr0MY8TsbipziOFSnYK4E ggvGu9uZ69gX8cIg2NbQ52WLLEF1sgfZ629tbPo55A8CEpGy0fI0Fa6Mpbbe9RXEbCBW 0g/Kaz/OQy3ZtlZev92Kb/OKtV6aSXyrd8IZmo9NxbeBhexPdZn66yVqBZBfmDM5oqRT A5/n7bTSacETlksvhMy/BtRDi+0UdSDJ1cqUivrk8+QFDxAxfYolu4yrYioISAnsQWC+ xQwQ== 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=pplydIw3aMKsqvdgTdU8/nS7VlTB2EzgwMqQkCaddDc=; b=Vtvu0BkozhtR2id8WJLgw+OlDnGthGu3i+csgm84qLtcYopiUkUg7u9JV4Ze7NeKxd fP4+S2s6E1EkD532tkLeD8CewqvNxdTknV6llTVNBU+wWviZYrWi7W/A0L/IgfV8/CVA cVyaYqsbPXjIFOzx2D+qKxE6AQu7ZlV1Ou0AB8UtgOGTbLR3uVqGnOYlCrh1k6mDmFHq MTHf58+xeb5z/e3ZP8PQRwZYJuw/4XkjLJxbnj3hA74rBjIJzD73ZlMuDTt8q3w/eQ8T DMuzeXlpIbY1DxnoO4LxwbCrKfftsOG0wD6rSKhH+kqP9t1ufQ0qTBS7KTBDdnuY0oF2 hemw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iqpzhqRd; 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 t64-20020a638143000000b004786f5e24f9si17896415pgd.94.2022.12.21.15.06.42; Wed, 21 Dec 2022 15:06:57 -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=iqpzhqRd; 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 S235110AbiLUWnP (ORCPT + 99 others); Wed, 21 Dec 2022 17:43:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234882AbiLUWnB (ORCPT ); Wed, 21 Dec 2022 17:43:01 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8343020376 for ; Wed, 21 Dec 2022 14:42:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671662535; 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=pplydIw3aMKsqvdgTdU8/nS7VlTB2EzgwMqQkCaddDc=; b=iqpzhqRd5UHD2z9nrcTBzcNBi24dZUHfMsCmwf//W7SrjZB4kqfy82OMNIwO3SnAt/Uv82 D63Dtam+TOlywf+eRFBHSq/Usj+vz3v7zf2z6fILWLKbCko4LN9xm7Q/Cv958PR7oXap9V vG5LIN43dYLJq3YYvjnF0WZscMUmSMc= 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-642-keguWWWrPN6K1b3PzfrVGw-1; Wed, 21 Dec 2022 17:42:10 -0500 X-MC-Unique: keguWWWrPN6K1b3PzfrVGw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 02D3C1C05134; Wed, 21 Dec 2022 22:42:10 +0000 (UTC) Received: from rules.brq.redhat.com (ovpn-208-11.brq.redhat.com [10.40.208.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id EB35B40C2064; Wed, 21 Dec 2022 22:42:07 +0000 (UTC) From: Vladis Dronov To: herbert@gondor.apana.org.au, davem@davemloft.net Cc: nstange@suse.de, elliott@hpe.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, smueller@chronox.de, vdronov@redhat.com Subject: [PATCH 4/6] crypto: testmgr - disallow plain cbcmac(aes) in FIPS mode Date: Wed, 21 Dec 2022 23:41:09 +0100 Message-Id: <20221221224111.19254-5-vdronov@redhat.com> In-Reply-To: <20221221224111.19254-1-vdronov@redhat.com> References: <20221221224111.19254-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.1 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=unavailable 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 cbcmac(aes) may be used only as part of the ccm(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 cbcmac(aes) 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 --- crypto/testmgr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 4476ac97baa5..562463a77a76 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -4501,7 +4501,6 @@ static const struct alg_test_desc alg_test_descs[] = { }, { #endif .alg = "cbcmac(aes)", - .fips_allowed = 1, .test = alg_test_hash, .suite = { .hash = __VECS(aes_cbcmac_tv_template) -- 2.38.1