crypto: ccp - Prevent information leakage on export
authorTom Lendacky <thomas.lendacky@amd.com>
Wed, 13 Apr 2016 15:52:25 +0000 (10:52 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 15 Jun 2016 20:29:24 +0000 (21:29 +0100)
commitd8b40ad2f49f447f2ed7386366acae007f52ea2a
tree8f1b7a974e4550147c4bc562d69651069527c436
parente6bfaf526363c5990f02b2ce86dd6fa797d9c8ce
crypto: ccp - Prevent information leakage on export

commit f709b45ec461b548c41a00044dba1f1b572783bf upstream.

Prevent information from leaking to userspace by doing a memset to 0 of
the export state structure before setting the structure values and copying
it. This prevents un-initialized padding areas from being copied into the
export area.

Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/crypto/ccp/ccp-crypto-aes-cmac.c
drivers/crypto/ccp/ccp-crypto-sha.c