summaryrefslogtreecommitdiff
path: root/drivers/crypto/axis/artpec6_crypto.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-12-30 21:19:31 -0600
committerHerbert Xu <herbert@gondor.apana.org.au>2020-01-09 11:30:51 +0800
commitbd56cea012fc2d6381e8cd3209510ce09f9de8c9 (patch)
tree0c109c0d8717e8fecab71f165521ba7a6ed89576 /drivers/crypto/axis/artpec6_crypto.c
parent70ffa8fd72b8df7ddfedc0b7db042eea75182fd5 (diff)
downloadlinux-next-bd56cea012fc2d6381e8cd3209510ce09f9de8c9.tar.gz
crypto: chelsio - fix writing tfm flags to wrong place
The chelsio crypto driver is casting 'struct crypto_aead' directly to 'struct crypto_tfm', which is incorrect because the crypto_tfm isn't the first field of 'struct crypto_aead'. Consequently, the calls to crypto_tfm_set_flags() are modifying some other field in the struct. Also, the driver is setting CRYPTO_TFM_RES_BAD_KEY_LEN in ->setauthsize(), not just in ->setkey(). This is incorrect since this flag is for bad key lengths, not for bad authentication tag lengths. Fix these bugs by removing the broken crypto_tfm_set_flags() calls from ->setauthsize() and by fixing them in ->setkey(). Fixes: 324429d74127 ("chcr: Support for Chelsio's Crypto Hardware") Cc: <stable@vger.kernel.org> # v4.9+ Cc: Atul Gupta <atul.gupta@chelsio.com> Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/axis/artpec6_crypto.c')
0 files changed, 0 insertions, 0 deletions