From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:43664 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751514AbeBBKoc (ORCPT ); Fri, 2 Feb 2018 05:44:32 -0500 Subject: Patch "staging: ccree: NULLify backup_info when unused" has been added to the 4.15-stable tree To: gilad@benyossef.com, gregkh@linuxfoundation.org Cc: , From: Date: Fri, 02 Feb 2018 11:44:02 +0100 Message-ID: <15175682425787@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled staging: ccree: NULLify backup_info when unused to the 4.15-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: staging-ccree-nullify-backup_info-when-unused.patch and it can be found in the queue-4.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 46df8824982e4fb0198776078d4a8c3e2d531464 Mon Sep 17 00:00:00 2001 From: Gilad Ben-Yossef Date: Sun, 3 Dec 2017 13:58:19 +0000 Subject: staging: ccree: NULLify backup_info when unused From: Gilad Ben-Yossef commit 46df8824982e4fb0198776078d4a8c3e2d531464 upstream. backup_info field is only allocated for decrypt code path. The field was not nullified when not used causing a kfree in an error handling path to attempt to free random addresses as uncovered in stress testing. Fixes: 737aed947f9b ("staging: ccree: save ciphertext for CTS IV") Signed-off-by: Gilad Ben-Yossef Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ccree/ssi_cipher.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/staging/ccree/ssi_cipher.c +++ b/drivers/staging/ccree/ssi_cipher.c @@ -908,6 +908,7 @@ static int ssi_ablkcipher_decrypt(struct scatterwalk_map_and_copy(req_ctx->backup_info, req->src, (req->nbytes - ivsize), ivsize, 0); req_ctx->is_giv = false; + req_ctx->backup_info = NULL; return ssi_blkcipher_process(tfm, req_ctx, req->dst, req->src, req->nbytes, req->info, ivsize, (void *)req, DRV_CRYPTO_DIRECTION_DECRYPT); } Patches currently in stable-queue which might be from gilad@benyossef.com are queue-4.15/staging-ccree-fix-fips-event-irq-handling-build.patch queue-4.15/staging-ccree-nullify-backup_info-when-unused.patch