staging: ccree: NULLify backup_info when unused
authorGilad Ben-Yossef <gilad@benyossef.com>
Sun, 3 Dec 2017 13:58:19 +0000 (13:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Feb 2018 16:39:18 +0000 (17:39 +0100)
commitfad7da7b638a1f5900bee31ed598b7c527d3a14c
treed33b041758ded3ca0c9eaca6923dae25c2ac332d
parent7a4b5ee973cfbcf32bff2fe03bed1786d5baa14e
staging: ccree: NULLify backup_info when unused

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 <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ccree/ssi_cipher.c