linux-stable/drivers/crypto
Eric Biggers 0b751f35f9 crypto: atmel-sha - fix error handling when setting hmac key
commit b529f1983b upstream.

HMAC keys can be of any length, and atmel_sha_hmac_key_set() can only
fail due to -ENOMEM.  But atmel_sha_hmac_setkey() incorrectly treated
any error as a "bad key length" error.  Fix it to correctly propagate
the -ENOMEM error code and not set any tfm result flags.

Fixes: 81d8750b2b ("crypto: atmel-sha - add support to hmac(shaX)")
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-14 16:32:23 -05:00
..
amcc crypto: crypto4xx - Fix wrong ppc4xx_trng_probe()/ppc4xx_trng_remove() arguments 2020-01-27 14:46:15 +01:00
axis crypto: artpec6 - return correct error code for failed setkey() 2020-02-14 16:32:23 -05:00
bcm crypto: brcm - Fix some set-but-not-used warning 2020-01-27 14:46:13 +01:00
caam crypto: caam - free resources in case caam_rng registration failed 2020-01-27 14:46:42 +01:00
cavium crypto: cavium/zip - Add missing single_release() 2019-10-11 18:18:33 +02:00
ccp crypto: ccp - set max RSA modulus size for v3 platform devices as well 2020-02-14 16:32:13 -05:00
chelsio crypto: chelsio - fix writing tfm flags to wrong place 2020-02-05 14:18:03 +00:00
inside-secure crypto: inside-secure - fix the invalidation step during cra_exit 2018-05-25 16:17:46 +02:00
marvell License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mediatek
nx crypto/NX: Set receive window credits to max number of CRBs in RxFIFO 2019-07-21 09:04:42 +02:00
qat crypto: qat - Silence smp_processor_id() warning 2019-10-11 18:18:32 +02:00
qce License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rockchip crypto: rockchip - update IV buffer to contain the next IV 2019-05-21 18:50:15 +02:00
stm32 crypto: stm32/hash - Fix hmac issue more than 256 bytes 2019-12-05 15:38:29 +01:00
sunxi-ss crypto: sun4i-ss - fix big endian issues 2020-01-27 14:46:03 +01:00
ux500 crypto: ux500 - Use proper enum in hash_set_dma_transfer 2019-02-12 19:46:08 +01:00
virtio crypto: virtio - deal with unsupported input sizes 2019-12-31 12:37:42 +01:00
vmx crypto: vmx - Avoid weird build failures 2019-12-31 12:37:50 +01:00
atmel-aes-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-aes.c crypto: atmel-aes - Fix counter overflow in CTR mode 2020-02-14 16:32:14 -05:00
atmel-authenc.h
atmel-ecc.c
atmel-ecc.h
atmel-sha-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-sha.c crypto: atmel-sha - fix error handling when setting hmac key 2020-02-14 16:32:23 -05:00
atmel-tdes-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-tdes.c
bfin_crc.c crypto: hash - annotate algorithms taking optional key 2018-02-16 20:23:00 +01:00
bfin_crc.h
exynos-rng.c
geode-aes.c
geode-aes.h
hifn_795x.c
img-hash.c
ixp4xx_crypto.c
Kconfig crypto: bcm - convert to use crypto_authenc_extractkeys() 2019-01-23 08:09:47 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mv_cesa.c
mv_cesa.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mxc-scc.c crypto: mxc-scc - fix build warnings on ARM64 2019-12-05 15:37:47 +01:00
mxs-dcp.c crypto: mxs-dcp - Fix AES issues 2019-11-24 08:23:18 +01:00
n2_asm.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
n2_core.c crypto: n2 - cure use after free 2018-01-10 09:31:18 +01:00
n2_core.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
omap-aes-gcm.c
omap-aes.c
omap-aes.h
omap-crypto.c
omap-crypto.h
omap-des.c
omap-sham.c crypto: omap-sham - fix memleak 2018-06-16 09:45:18 +02:00
padlock-aes.c crypto: padlock-aes - Fix Nano workaround data corruption 2018-08-06 16:20:51 +02:00
padlock-sha.c
picoxcell_crypto.c crypto: picoxcell - adjust the position of tasklet_init and fix missed tasklet_kill 2020-02-14 16:32:14 -05:00
picoxcell_crypto_regs.h
s5p-sss.c crypto: s5p-sss: Fix Fix argument list alignment 2019-11-20 18:00:47 +01:00
sahara.c crypto: sharah - Unregister correct algorithms for SAHARA 3 2018-09-26 08:38:05 +02:00
talitos.c crypto: talitos - fix missing break in switch statement 2019-10-05 12:47:33 +02:00
talitos.h