Patch "crypto: ccp - Prevent information leakage on export" has been added to the 4.5-stable tree
This is a note to let you know that I've just added the patch titled
crypto: ccp - Prevent information leakage on export
to the 4.5-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-prevent-information-leakage-on-export.patch
and it can be found in the queue-4.5 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
f709b45ec461b548c41a00044dba1f1b572783bfMon Sep 17 00:00:00 2001
From: Tom Lendacky <[email protected]>
Date: Wed, 13 Apr 2016 10:52:25 -0500
Subject: crypto: ccp - Prevent information leakage on export
From: Tom Lendacky <[email protected]>
commit f709b45ec461b548c41a00044dba1f1b572783bf upstream.
Prevent information from leaking to userspace by doing a memset to 0 of the export state structure before setting the structure values and copying it. This prevents un-initialized padding areas from being copied into the export area.
--- drivers/crypto/ccp/ccp-crypto-aes-cmac.c | 3 +++ drivers/crypto/ccp/ccp-crypto-sha.c | 3 +++ 2 files changed, 6 insertions(+)
drivers/crypto/ccp/ccp-crypto-aes-cmac.c +3 -0
@@ -225,6 +225,9 @@ static int ccp_aes_cmac_export(struct ahstruct ccp_aes_cmac_req_ctx *rctx =ahash_request_ctx (req);struct ccp_aes_cmac_exp_ctx state; +/* Don't let anything leak to 'out' */ +memset (&state,0 ,sizeof (state)); + state.null_msg = rctx->null_msg;memcpy (state.iv, rctx->iv,sizeof (state.iv)); state.buf_count = rctx->buf_count;
drivers/crypto/ccp/ccp-crypto-sha.c +3 -0
@@ -212,6 +212,9 @@ static int ccp_sha_export(struct ahash_rstruct ccp_sha_req_ctx *rctx =ahash_request_ctx (req);struct ccp_sha_exp_ctx state; +/* Don't let anything leak to 'out' */ +memset (&state,0 ,sizeof (state)); + state.type = rctx->type; state.msg_bits = rctx->msg_bits; state.first = rctx->first;
Patches currently in stable-queue which might be from [email protected] are
queue-4.5/crypto-ccp-prevent-information-leakage-on-export.patch