Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6461579rwl; Thu, 29 Dec 2022 13:21:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXt5OVgLjVlEcEUr0sslhrX14LApCqMgN83ptYZFjWIun71v7HyKqDIbnkF3E2D6Lk34ekQl X-Received: by 2002:a05:6a00:f8d:b0:577:501c:c154 with SMTP id ct13-20020a056a000f8d00b00577501cc154mr45883007pfb.6.1672348881393; Thu, 29 Dec 2022 13:21:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672348881; cv=none; d=google.com; s=arc-20160816; b=ZFLvlQVTYoqbVRfzs/7wmwO0Br+u4HX/TzJsEgfUXKYevPfblVzhyxIf/K2UcGAcg0 uY7AqCNhWKBtFQNIx9EoyoeUIWVLekrjOndh9jiDvl0PyIoRLWGUbnpm+YXZfbiZDBPN R+k5FuuRCBaBpn0Zu+iItM3VRE1/LiIgfQEd/XjJUavUKdV4Xhz8iREFBmC8PQUVgfYi WOQKONBvjVSSvsuAmOA8tQvkTKVh9PzjSmrF+lu/ydDMXsCbO/YqmhlZO//jTEAi9R75 bbSWGtyP+rpccAWWcR1Kxd3oe0qCy2MErResQwUIJk8fwGtD8gRU68rjPBrnNxUpyT9c /vfA== 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=u4XU0/ViFb8ZhxRIFq9CIV03W4PDvA/ezXEIfRJK4bMDJg+OLY/HEWuEnyJRR2Hijn r1GHM2eZDDqV4qvZpj9VoxbuPk5XIIbpqHqNFGZAITqdR4rihLV24ZrFsSuiIE4Uchu3 8AfB9HVVd8IfP4C3cWI19yUMTErh/Y5Ukzp8/St6RgxlKOE745rq4LRX/oDQohmB65rC KlSYmm5BNw2qHQctScKtlQ7rLNUgWhyU0TTnVjwFsp/yf8Qhvqys5gYnpckOw0+Xu2ag aCdV8Mpa0XZQLMjUt2bXqFSAZAWZM/M14KPQ9+S5KgWzX6Ai2Z28l9AcZFP7jylEVP6w +6zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iNXCv+o8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 d10-20020a056a0024ca00b0057731e4f614si3732599pfv.85.2022.12.29.13.21.12; Thu, 29 Dec 2022 13:21:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=iNXCv+o8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S234211AbiL2VSc (ORCPT + 61 others); Thu, 29 Dec 2022 16:18:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234084AbiL2VSP (ORCPT ); Thu, 29 Dec 2022 16:18:15 -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 EF8A6CE01 for ; Thu, 29 Dec 2022 13:17:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672348654; 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=iNXCv+o8ua4uPU6rd5rI0p4ZbIMGQ0etGTwbX/EOqfzkVbBpMvlxuBYzrqKLu1QQYK/EL5 xWT+hS99KmEqByjc8Ffb2vcgWnjNwqu2AwZWwGI1zrwnnRyhPgYyHgVi2bDrIA84vxLzzz J8BTZgSKIsdb+kxV5WSFRsjEBtpb0mc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-447-owDk3qTrMFuKZDB4zJksYg-1; Thu, 29 Dec 2022 16:17:31 -0500 X-MC-Unique: owDk3qTrMFuKZDB4zJksYg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7EA13858F09; Thu, 29 Dec 2022 21:17:30 +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 43B4F492B00; Thu, 29 Dec 2022 21:17:28 +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 v3 4/6] crypto: testmgr - disallow plain cbcmac(aes) in FIPS mode Date: Thu, 29 Dec 2022 22:17:08 +0100 Message-Id: <20221229211710.14912-5-vdronov@redhat.com> In-Reply-To: <20221229211710.14912-1-vdronov@redhat.com> References: <20221229211710.14912-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.10 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-kernel@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