crypto: ccp - Prevent information leakage on export
authorTom Lendacky <thomas.lendacky@amd.com>
Wed, 13 Apr 2016 15:52:25 +0000 (10:52 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 15 Apr 2016 14:13:56 +0000 (22:13 +0800)
commitf709b45ec461b548c41a00044dba1f1b572783bf
tree8bf82dcdad57d141c1ff585865bff2ced1fc7c6a
parent0851561d9c965df086ef8a53f981f5f95a57c2c8
crypto: ccp - Prevent information leakage on export

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.

Cc: <stable@vger.kernel.org> # 3.14.x-
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>
drivers/crypto/ccp/ccp-crypto-aes-cmac.c
drivers/crypto/ccp/ccp-crypto-sha.c