Re: [PATCH] crypto: testmgr - skip crc32c context test for ahash algorithms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 23, 2019 at 08:57:35PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
> 
> Instantiating "cryptd(crc32c)" causes a crypto self-test failure because
> the crypto_alloc_shash() in alg_test_crc32c() fails.  This is because
> cryptd(crc32c) is an ahash algorithm, not a shash algorithm; so it can
> only be accessed through the ahash API, unlike shash algorithms which
> can be accessed through both the ahash and shash APIs.
> 
> As the test is testing the shash descriptor format which is only
> applicable to shash algorithms, skip it for ahash algorithms.
> 
> (Note that it's still important to fix crypto self-test failures even
>  for weird algorithm instantiations like cryptd(crc32c) that no one
>  would really use; in fips_enabled mode unprivileged users can use them
>  to panic the kernel, and also they prevent treating a crypto self-test
>  failure as a bug when fuzzing the kernel.)
> 
> Fixes: 8e3ee85e68c5 ("crypto: crc32c - Test descriptor context format")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
> ---
>  crypto/testmgr.c | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux