crypto: ccp/gcm - use const time tag comparison.
authorCfir Cohen <cfir@google.com>
Tue, 2 Jul 2019 17:32:56 +0000 (10:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jul 2019 05:28:36 +0000 (07:28 +0200)
commit4fbcf8bf674ca09abe31d6b47e9a97ddad4a32b4
treef21a396711ee1994ceffedaa91807558d66bdf64
parenteba522cd0cf1185599f85d69a93836ade02baf2b
crypto: ccp/gcm - use const time tag comparison.

commit 538a5a072e6ef04377b180ee9b3ce5bae0a85da4 upstream.

Avoid leaking GCM tag through timing side channel.

Fixes: 36cf515b9bbe ("crypto: ccp - Enable support for AES GCM on v5 CCPs")
Cc: <stable@vger.kernel.org> # v4.12+
Signed-off-by: Cfir Cohen <cfir@google.com>
Acked-by: Gary R Hook <ghook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/ccp/ccp-ops.c