crypto: inside-secure - fix zeroing of the request in ahash_exit_inv
authorAntoine Tenart <antoine.tenart@bootlin.com>
Mon, 27 May 2019 14:51:01 +0000 (16:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:53 +0000 (14:50 +0100)
commit65bf43424df4688215ba6f2bfa5d00fca3b3f481
tree3e0946c6dcf8593acbffafda274255ade4f98fa7
parentae6bc5b8ccdfefabcf70cd380c0716bffd8eaf5d
crypto: inside-secure - fix zeroing of the request in ahash_exit_inv

[ Upstream commit b926213d6fede9c9427d7c12eaf7d9f0895deb4e ]

A request is zeroed in safexcel_ahash_exit_inv(). This request total
size is EIP197_AHASH_REQ_SIZE while the memset zeroing it uses
sizeof(struct ahash_request), which happens to be less than
EIP197_AHASH_REQ_SIZE. This patch fixes it.

Fixes: f6beaea30487 ("crypto: inside-secure - authenc(hmac(sha256), cbc(aes)) support")
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/inside-secure/safexcel_hash.c