All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "crypto: caam - defer aead_set_sh_desc in case of zero authsize" has been added to the 4.7-stable tree
@ 2016-09-02 13:55 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-09-02 13:55 UTC (permalink / raw)
  To: horia.geanta, gregkh, herbert; +Cc: stable, stable-commits


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.7-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.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 2fdea258fde036a87d3396ec9c0ef66f10768530 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Horia=20Geant=C4=83?= <horia.geanta@nxp.com>
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ă <horia.geanta@nxp.com>

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.

Fixes: 479bcc7c5b9e ("crypto: caam - Convert authenc to new AEAD interface")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/crypto/caam/caamalg.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/crypto/caam/caamalg.c
+++ b/drivers/crypto/caam/caamalg.c
@@ -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 horia.geanta@nxp.com are

queue-4.7/crypto-caam-fix-echainiv-authenc-encrypt-shared-descriptor.patch
queue-4.7/crypto-caam-defer-aead_set_sh_desc-in-case-of-zero-authsize.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-02 13:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-02 13:55 Patch "crypto: caam - defer aead_set_sh_desc in case of zero authsize" has been added to the 4.7-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.