mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 14:14:37 +00:00
staging: ccree: NULLify backup_info when unused
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: 737aed947f
("staging: ccree: save ciphertext for CTS IV")
Cc: stable@vger.kernel.org
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0d527ecc48
commit
46df882498
1 changed files with 1 additions and 0 deletions
|
@ -907,6 +907,7 @@ static int ssi_ablkcipher_encrypt(struct ablkcipher_request *req)
|
|||
unsigned int ivsize = crypto_ablkcipher_ivsize(ablk_tfm);
|
||||
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue