linux/drivers/crypto
Eric Biggers 9d9fb93084 crypto: chelsio - fix writing tfm flags to wrong place
commit bd56cea012 upstream.

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: 324429d741 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-01 09:37:04 +00:00
..
amcc crypto: crypto4xx - Fix wrong ppc4xx_trng_probe()/ppc4xx_trng_remove() arguments 2020-01-27 14:50:17 +01:00
axis crypto: axis - fix for recursive locking from bottom half 2019-04-20 09:16:04 +02:00
bcm crypto: brcm - Fix some set-but-not-used warning 2020-01-27 14:50:13 +01:00
caam crypto: caam - free resources in case caam_rng registration failed 2020-01-27 14:51:03 +01:00
cavium crypto: cavium/zip - Add missing single_release() 2019-10-11 18:20:53 +02:00
ccp crypto: ccp - Reduce maximum stack usage 2020-01-27 14:51:02 +01:00
ccree crypto: ccree - reduce kernel stack usage with clang 2020-01-27 14:50:33 +01:00
chelsio crypto: chelsio - fix writing tfm flags to wrong place 2020-02-01 09:37:04 +00:00
hisilicon crypto: hisilicon - Matching the dma address for dma_pool_free() 2020-01-27 14:51:14 +01:00
inside-secure crypto: inside-secure - fix queued len computation 2020-01-27 14:50:53 +01:00
marvell
mediatek
nx crypto/NX: Set receive window credits to max number of CRBs in RxFIFO 2019-07-21 09:03:16 +02:00
qat crypto: qat - Silence smp_processor_id() warning 2019-10-11 18:20:52 +02:00
qce
rockchip crypto: rockchip - update IV buffer to contain the next IV 2019-05-22 07:37:37 +02:00
stm32 crypto: stm32/hash - Fix hmac issue more than 256 bytes 2019-12-05 09:21:34 +01:00
sunxi-ss crypto: sun4i-ss - fix big endian issues 2020-01-27 14:49:53 +01:00
ux500
virtio crypto: virtio - implement missing support for output IVs 2020-01-17 19:47:04 +01:00
vmx crypto: vmx - Avoid weird build failures 2019-12-31 16:36:13 +01:00
atmel-aes-regs.h
atmel-aes.c crypto: atmel - Fix authenc support when it is set to m 2019-12-31 16:35:56 +01:00
atmel-authenc.h crypto: atmel - Fix authenc support when it is set to m 2019-12-31 16:35:56 +01:00
atmel-ecc.c
atmel-ecc.h
atmel-sha-regs.h
atmel-sha.c crypto: atmel - Fix authenc support when it is set to m 2019-12-31 16:35:56 +01:00
atmel-tdes-regs.h
atmel-tdes.c
exynos-rng.c
geode-aes.c crypto: geode-aes - switch to skcipher for cbc(aes) fallback 2020-01-29 16:43:23 +01:00
geode-aes.h crypto: geode-aes - switch to skcipher for cbc(aes) fallback 2020-01-29 16:43:23 +01:00
hifn_795x.c
img-hash.c
ixp4xx_crypto.c
Kconfig
Makefile
mxc-scc.c crypto: mxc-scc - fix build warnings on ARM64 2019-12-05 09:20:49 +01:00
mxs-dcp.c crypto: mxs-dcp - Fix AES issues 2019-11-24 08:20:31 +01:00
n2_asm.S
n2_core.c
n2_core.h
omap-aes-gcm.c
omap-aes.c
omap-aes.h
omap-crypto.c
omap-crypto.h
omap-des.c
omap-sham.c
padlock-aes.c
padlock-sha.c
picoxcell_crypto_regs.h
picoxcell_crypto.c
qcom-rng.c
s5p-sss.c crypto: s5p-sss: Fix Fix argument list alignment 2019-11-20 18:47:43 +01:00
sahara.c
talitos.c crypto: talitos - fix AEAD processing. 2020-01-27 14:50:52 +01:00
talitos.h crypto: talitos - fix AEAD processing. 2020-01-27 14:50:52 +01:00