crypto: ccree - use the full crypt length value
authorGilad Ben-Yossef <gilad@benyossef.com>
Mon, 29 Jul 2019 10:40:18 +0000 (13:40 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Oct 2019 16:20:55 +0000 (18:20 +0200)
commita0dc60ac6bef99fe8c00bbebffa66b704c075d15
treec9d581461f8e51d62607cea29183bb70f299fc48
parentf5c087a0d9a0e31b4a97ebba3b5eb263f1a6c24f
crypto: ccree - use the full crypt length value

commit 7a4be6c113c1f721818d1e3722a9015fe393295c upstream.

In case of AEAD decryption verifcation error we were using the
wrong value to zero out the plaintext buffer leaving the end of
the buffer with the false plaintext.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Fixes: ff27e85a85bb ("crypto: ccree - add AEAD support")
CC: stable@vger.kernel.org # v4.17+
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/ccree/cc_aead.c