linux/drivers/crypto/marvell
Russell King 9f5594c91e crypto: marvell/cesa - fix stack smashing in marvell/hash.c
Several of the algorithms in marvell/hash.c have a statesize of zero.
When an AF_ALG accept() on an already-accepted file descriptor to
calls into hash_accept(), this causes:

	char state[crypto_ahash_statesize(crypto_ahash_reqtfm(req))];

to be zero-sized, but we still pass this to:

	err = crypto_ahash_export(req, state);

which proceeds to write to 'state' as if it was a "struct md5_state",
"struct sha1_state" etc.  Add the necessary initialisers for the
.statesize member.

Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2015-10-14 22:23:17 +08:00
..
cesa.c crypto: marvell/cesa - Drop owner assignment from platform_driver 2015-07-14 14:56:48 +08:00
cesa.h crypto: marvell/cesa - add SHA256 support 2015-06-19 22:18:04 +08:00
cipher.c crypto: marvell/cesa - add Triple-DES support 2015-06-19 22:18:04 +08:00
hash.c crypto: marvell/cesa - fix stack smashing in marvell/hash.c 2015-10-14 22:23:17 +08:00
Makefile crypto: marvell/cesa - add TDMA support 2015-06-19 22:18:03 +08:00
tdma.c crypto: marvell/cesa - add TDMA support 2015-06-19 22:18:03 +08:00