]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: ccp - memset request context to zero during import
authorTom Lendacky <thomas.lendacky@amd.com>
Thu, 25 Feb 2016 22:48:13 +0000 (16:48 -0600)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 18 Apr 2016 12:50:41 +0000 (08:50 -0400)
commitdad41d54081e1bd2ef601c702ff4ea0f7428a965
tree7bd3fba876491992faa5ed1d96abbdba0e396fff
parent503f8305ab1b82d8788a2f161e7c52c0c0f6aeac
crypto: ccp - memset request context to zero during import

[ Upstream commit ce0ae266feaf35930394bd770c69778e4ef03ba9 ]

Since a crypto_ahash_import() can be called against a request context
that has not had a crypto_ahash_init() performed, the request context
needs to be cleared to insure there is no random data present. If not,
the random data can result in a kernel oops during crypto_ahash_update().

Cc: <stable@vger.kernel.org> # 3.14.x-
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/crypto/ccp/ccp-crypto-aes-cmac.c
drivers/crypto/ccp/ccp-crypto-sha.c