crypto: ccp - Ignore tag length when decrypting GCM ciphertext
authorGary R Hook <gary.hook@amd.com>
Tue, 30 Jul 2019 16:05:26 +0000 (16:05 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Aug 2019 08:12:38 +0000 (10:12 +0200)
commit6dbc3b74daeb3475354cd135fcbfe14ae6abfe24
tree794ef39cf4a95fb803409ca92a576a0782e6fcff
parent30692edea30d633212e01f2378ac94d09c52f5d3
crypto: ccp - Ignore tag length when decrypting GCM ciphertext

commit e2664ecbb2f26225ac6646876f2899558ffb2604 upstream.

AES GCM input buffers for decryption contain AAD+CTEXT+TAG. Only
decrypt the ciphertext, and use the tag for comparison.

Fixes: 36cf515b9bbe2 ("crypto: ccp - Enable support for AES GCM on v5 CCPs")
Cc: <stable@vger.kernel.org>
Signed-off-by: Gary R Hook <gary.hook@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