From: Nicolai Stange Date: Thu, 29 Dec 2022 21:17:09 +0000 (+0100) Subject: crypto: testmgr - disallow plain ghash in FIPS mode X-Git-Tag: v6.3-rc1~163^2~139 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2912eb9b17ac29facd799ffe05fdb7cf10017e82;p=thirdparty%2Fkernel%2Flinux.git crypto: testmgr - disallow plain ghash in FIPS mode 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 Signed-off-by: Herbert Xu --- diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 562463a77a762..a223cf5f36269 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) }