]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:46:10 +0000 (15:46 -0700)
commitcb783bab4a3452dc064580df4a193dc1e74a555e
tree7ab2bb3847dc1593e6d7de4c5ccfbb95b77f9503
parentba6f3a3d71aef3505976c3120040a8686889c701
crypto: ccp - memset request context to zero during import

Orabug: 23331072

[ 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>
(cherry picked from commit dad41d54081e1bd2ef601c702ff4ea0f7428a965)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/crypto/ccp/ccp-crypto-aes-cmac.c
drivers/crypto/ccp/ccp-crypto-sha.c