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>
Fri, 26 Jul 2019 07:14:20 +0000 (09:14 +0200)
commita9fd1795fee69a9d384ead855e045edd5a035bb5
treeba1af27ea62916ccf032799b1c3b860942ff7a5a
parent561c4424f1e3f30615bc5701151709e0b59e1d3e
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