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)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 27 Feb 2016 19:26:35 +0000 (03:26 +0800)
commitce0ae266feaf35930394bd770c69778e4ef03ba9
treeac36429324fa84177f969279f17a274158661c32
parent9c6bd0c2f103f4748cb4abcaf141f7d11aabfe9f
crypto: ccp - memset request context to zero during import

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>
drivers/crypto/ccp/ccp-crypto-aes-cmac.c
drivers/crypto/ccp/ccp-crypto-sha.c