mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
crypto: inside-secure - fix zeroing of the request in ahash_exit_inv
[ Upstream commitb926213d6f] 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:f6beaea304("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ae6bc5b8cc
commit
65bf43424d
@@ -486,7 +486,7 @@ static int safexcel_ahash_exit_inv(struct crypto_tfm *tfm)
|
||||
struct safexcel_inv_result result = {};
|
||||
int ring = ctx->base.ring;
|
||||
|
||||
memset(req, 0, sizeof(struct ahash_request));
|
||||
memset(req, 0, EIP197_AHASH_REQ_SIZE);
|
||||
|
||||
/* create invalidation request */
|
||||
init_completion(&result.completion);
|
||||
|
||||
Reference in New Issue
Block a user