* Patch "crypto: nx - off by one bug in nx_of_update_msc()" has been added to the 3.14-stable tree
@ 2016-09-05 14:20 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-09-05 14:20 UTC (permalink / raw)
To: dan.carpenter, gregkh, herbert; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
crypto: nx - off by one bug in nx_of_update_msc()
to the 3.14-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-nx-off-by-one-bug-in-nx_of_update_msc.patch
and it can be found in the queue-3.14 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 e514cc0a492a3f39ef71b31590a7ef67537ee04b Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Fri, 15 Jul 2016 14:09:13 +0300
Subject: crypto: nx - off by one bug in nx_of_update_msc()
From: Dan Carpenter <dan.carpenter@oracle.com>
commit e514cc0a492a3f39ef71b31590a7ef67537ee04b upstream.
The props->ap[] array is defined like this:
struct alg_props ap[NX_MAX_FC][NX_MAX_MODE][3];
So we can see that if msc->fc and msc->mode are == to NX_MAX_FC or
NX_MAX_MODE then we're off by one.
Fixes: ae0222b7289d ('powerpc/crypto: nx driver code supporting nx encryption')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/crypto/nx/nx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/crypto/nx/nx.c
+++ b/drivers/crypto/nx/nx.c
@@ -330,7 +330,7 @@ static void nx_of_update_msc(struct devi
((bytes_so_far + sizeof(struct msc_triplet)) <= lenp) &&
i < msc->triplets;
i++) {
- if (msc->fc > NX_MAX_FC || msc->mode > NX_MAX_MODE) {
+ if (msc->fc >= NX_MAX_FC || msc->mode >= NX_MAX_MODE) {
dev_err(dev, "unknown function code/mode "
"combo: %d/%d (ignored)\n", msc->fc,
msc->mode);
Patches currently in stable-queue which might be from dan.carpenter@oracle.com are
queue-3.14/crypto-nx-off-by-one-bug-in-nx_of_update_msc.patch
queue-3.14/acpi-sysfs-fix-error-code-in-get_status.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-09-05 14:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-05 14:20 Patch "crypto: nx - off by one bug in nx_of_update_msc()" has been added to the 3.14-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.