mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
crypto: ccree - use the full crypt length value
commit7a4be6c113
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:ff27e85a85
("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>
This commit is contained in:
parent
f5c087a0d9
commit
a0dc60ac6b
1 changed files with 1 additions and 1 deletions
|
@ -227,7 +227,7 @@ static void cc_aead_complete(struct device *dev, void *cc_req, int err)
|
|||
/* In case of payload authentication failure, MUST NOT
|
||||
* revealed the decrypted message --> zero its memory.
|
||||
*/
|
||||
cc_zero_sgl(areq->dst, areq_ctx->cryptlen);
|
||||
cc_zero_sgl(areq->dst, areq->cryptlen);
|
||||
err = -EBADMSG;
|
||||
}
|
||||
} else { /*ENCRYPT*/
|
||||
|
|
Loading…
Reference in a new issue