* Patch "crypto: ccp - memset request context to zero during import" has been added to the 3.14-stable tree
@ 2016-04-09 23:54 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-04-09 23:54 UTC (permalink / raw)
To: thomas.lendacky, gregkh, herbert; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
crypto: ccp - memset request context to zero during import
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-ccp-memset-request-context-to-zero-during-import.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 ce0ae266feaf35930394bd770c69778e4ef03ba9 Mon Sep 17 00:00:00 2001
From: Tom Lendacky <thomas.lendacky@amd.com>
Date: Thu, 25 Feb 2016 16:48:13 -0600
Subject: crypto: ccp - memset request context to zero during import
From: Tom Lendacky <thomas.lendacky@amd.com>
commit ce0ae266feaf35930394bd770c69778e4ef03ba9 upstream.
Since a crypto_ahash_import() can be called against a request context
that has not had a crypto_ahash_init() performed, the request context
needs to be cleared to insure there is no random data present. If not,
the random data can result in a kernel oops during crypto_ahash_update().
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/crypto/ccp/ccp-crypto-aes-cmac.c | 1 +
drivers/crypto/ccp/ccp-crypto-sha.c | 1 +
2 files changed, 2 insertions(+)
--- a/drivers/crypto/ccp/ccp-crypto-aes-cmac.c
+++ b/drivers/crypto/ccp/ccp-crypto-aes-cmac.c
@@ -225,6 +225,7 @@ static int ccp_aes_cmac_import(struct ah
/* 'in' may not be aligned so memcpy to local variable */
memcpy(&state, in, sizeof(state));
+ memset(rctx, 0, sizeof(*rctx));
rctx->null_msg = state.null_msg;
memcpy(rctx->iv, state.iv, sizeof(rctx->iv));
rctx->buf_count = state.buf_count;
--- a/drivers/crypto/ccp/ccp-crypto-sha.c
+++ b/drivers/crypto/ccp/ccp-crypto-sha.c
@@ -283,6 +283,7 @@ static int ccp_sha_import(struct ahash_r
/* 'in' may not be aligned so memcpy to local variable */
memcpy(&state, in, sizeof(state));
+ memset(rctx, 0, sizeof(*rctx));
rctx->type = state.type;
rctx->msg_bits = state.msg_bits;
rctx->first = state.first;
Patches currently in stable-queue which might be from thomas.lendacky@amd.com are
queue-3.14/crypto-ccp-add-hash-state-import-and-export-support.patch
queue-3.14/crypto-ccp-don-t-assume-export-import-areas-are-aligned.patch
queue-3.14/crypto-ccp-memset-request-context-to-zero-during-import.patch
queue-3.14/crypto-ccp-limit-the-amount-of-information-exported.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-09 23:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-09 23:54 Patch "crypto: ccp - memset request context to zero during import" 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.