Patch "crypto: caam - defer aead_set_sh_desc in case of zero authsize" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
crypto: caam - defer aead_set_sh_desc in case of zero authsize
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
crypto-caam-defer-aead_set_sh_desc-in-case-of-zero-authsize.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
2fdea258fde036a87d3396ec9c0ef66f10768530Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Horia=20Geant=C4=83?= <[email protected]>
Date: Thu, 4 Aug 2016 20:02:47 +0300
Subject: crypto: caam - defer aead_set_sh_desc in case of zero authsize
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Horia Geantă <[email protected]>
commit 2fdea258fde036a87d3396ec9c0ef66f10768530 upstream.
To be able to generate shared descriptors for AEAD, the authentication size needs to be known. However, there is no imposed order of calling .setkey, .setauthsize callbacks.
Thus, in case authentication size is not known at .setkey time, defer it until .setauthsize is called.
The authsize != 0 check was incorrectly removed when converting the driver to the new AEAD interface.
--- drivers/crypto/caam/caamalg.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/crypto/caam/caamalg.c +3 -0
@@ -441,6 +441,9 @@ static int aead_set_sh_desc(struct crypt OP_ALG_AAI_CTR_MOD128);const bool is_rfc3686 = alg->caam.rfc3686; +if (!ctx->authsize) +return 0 ; +/* NULL encryption / decryption */ if (!ctx->enckeylen)return aead_null_set_sh_desc (aead);
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/crypto-caam-fix-echainiv-authenc-encrypt-shared-descriptor.patch queue-4.4/crypto-caam-defer-aead_set_sh_desc-in-case-of-zero-authsize.patch