Tudor Ambarus
96ce5238c7
crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize
...
commit 86ef1dfcb561473fbf5e199d58d18c55554d78be upstream.
commit 394a9e0447 ("crypto: cfb - add missing 'chunksize' property")
adds a test vector where the input length is smaller than the IV length
(the second test vector). This revealed a NULL pointer dereference in
the atmel-aes driver, that is caused by passing an incorrect offset in
scatterwalk_map_and_copy() when atmel_aes_complete() is called.
Do not save the IV in req->info of ablkcipher_request (or equivalently
req->iv of skcipher_request) when req->nbytes < ivsize, because the IV
will not be further used.
While touching the code, modify the type of ivsize from int to
unsigned int, to comply with the return type of
crypto_ablkcipher_ivsize().
Fixes: 91308019ec ("crypto: atmel-aes - properly set IV after {en,de}crypt")
Cc: <stable@vger.kernel.org>
Signed-off-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>
2019-12-13 08:43:05 +01:00
..
amcc
crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr
2019-12-13 08:43:04 +01:00
axis
crypto: artpec6 - use devm_platform_ioremap_resource() to simplify code
2019-08-09 15:11:58 +10:00
bcm
crypto: bcm/des - switch to new verification routines
2019-08-22 14:39:38 +10:00
caam
crypto: caam - Cast to long first before pointer conversion
2019-09-13 21:20:47 +10:00
cavium
crypto: cavium/zip - Add missing single_release()
2019-09-09 23:48:41 +10:00
ccp
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
2019-09-18 12:11:14 -07:00
ccree
crypto: ccree - enable CTS support in AES-XTS
2019-09-13 21:17:58 +10:00
chelsio
inet: stop leaking jiffies on the wire
2019-11-01 14:57:52 -07:00
hisilicon
crypto: hisilicon - avoid unused function warning
2019-09-20 23:05:33 +10:00
inside-secure
crypto: inside-secure - Fix stability issue with Macchiatobin
2019-12-04 22:30:44 +01:00
marvell
crypto: marvell - Use kzfree rather than its implementation
2019-09-09 23:48:40 +10:00
mediatek
crypto: mediatek - fix incorrect crypto key setting
2019-09-05 14:36:54 +10:00
nx
crypto: nx - remove unused variables 'nx_driver_string' and 'nx_driver_version'
2019-08-30 18:05:31 +10:00
qat
crypto: qat - Silence smp_processor_id() warning
2019-08-02 14:44:00 +10:00
qce
crypto: qce/des - switch to new verification routines
2019-08-22 14:57:32 +10:00
rockchip
crypto: rk3288/des - switch to new verification routines
2019-08-22 14:57:32 +10:00
stm32
crypto: des - split off DES library from generic DES cipher driver
2019-08-22 14:57:33 +10:00
sunxi-ss
crypto: sun4i/des - switch to new verification routines
2019-08-22 14:57:32 +10:00
ux500
crypto: ux500 - Fix COMPILE_TEST warnings
2019-09-09 23:48:41 +10:00
virtio
vmx
crypto: vmx/xts - use fallback for ciphertext stealing
2019-08-22 14:57:34 +10:00
atmel-aes-regs.h
atmel-aes.c
crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize
2019-12-13 08:43:05 +01:00
atmel-authenc.h
atmel-ecc.c
atmel-i2c.c
crypto: atmel - Fix -Wunused-const-variable warning
2019-08-30 18:05:31 +10:00
atmel-i2c.h
crypto: atmel - Fix -Wunused-const-variable warning
2019-08-30 18:05:31 +10:00
atmel-sha-regs.h
atmel-sha.c
crypto: drivers - Remove dev_err() usage after platform_get_irq()
2019-08-09 15:11:38 +10:00
atmel-sha204a.c
crypto: atmel-sha204a - Use device-managed registration API
2019-08-02 14:43:59 +10:00
atmel-tdes-regs.h
atmel-tdes.c
crypto: atmel/des - switch to new verification routines
2019-08-22 14:39:38 +10:00
exynos-rng.c
crypto: exynos - use devm_platform_ioremap_resource() to simplify code
2019-08-09 15:11:59 +10:00
geode-aes.c
geode-aes.h
hifn_795x.c
crypto: hifn/des - switch to new verification routines
2019-08-22 14:39:40 +10:00
img-hash.c
crypto: img-hash - use devm_platform_ioremap_resource() to simplify code
2019-08-09 15:11:59 +10:00
ixp4xx_crypto.c
crypto: ixp4xx/des - switch to new verification routines
2019-08-22 14:57:31 +10:00
Kconfig
crypto: talitos - Fix build error by selecting LIB_DES
2019-12-04 22:31:07 +01:00
Makefile
mxs-dcp.c
crypto: drivers - Remove dev_err() usage after platform_get_irq()
2019-08-09 15:11:38 +10:00
n2_asm.S
n2_core.c
crypto: n2 - Rename arrays to avoid conflict with crypto/sha256.h
2019-09-05 14:54:54 +10:00
n2_core.h
omap-aes-gcm.c
omap-aes.c
crypto: drivers - Remove dev_err() usage after platform_get_irq()
2019-08-09 15:11:38 +10:00
omap-aes.h
omap-crypto.c
omap-crypto.h
omap-des.c
crypto: omap/des - switch to new verification routines
2019-08-22 14:57:31 +10:00
omap-sham.c
crypto: drivers - Remove dev_err() usage after platform_get_irq()
2019-08-09 15:11:38 +10:00
padlock-aes.c
padlock-sha.c
picoxcell_crypto.c
crypto: picoxcell/des - switch to new verification routines
2019-08-22 14:57:31 +10:00
picoxcell_crypto_regs.h
qcom-rng.c
crypto: qcom-rng - use devm_platform_ioremap_resource() to simplify code
2019-08-09 15:12:03 +10:00
s5p-sss.c
crypto: s5p - use correct block size of 1 for ctr(aes)
2019-08-30 18:05:28 +10:00
sahara.c
crypto: drivers - Remove dev_err() usage after platform_get_irq()
2019-08-09 15:11:38 +10:00
talitos.c
crypto: talitos - fix missing break in switch statement
2019-09-20 22:53:08 +10:00
talitos.h