linux/drivers/staging/ccree
Gilad Ben-Yossef c5f39d0786 staging: ccree: fix leak of import() after init()
crypto_ahash_import() may be called either after
crypto_ahash_init() or without such call. Right now
we always internally call init() as part of
import(), thus leaking memory and mappings if the
user has already called init() herself.

Fix this by only calling init() internally if the
state is not already initialized.

Fixes: commit 454527d0d9 ("staging: ccree: fix hash import/export")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28 14:36:45 +01:00
..
Documentation/devicetree/bindings/crypto
cc_crypto_ctx.h
cc_hw_queue_defs.h
cc_lli_defs.h
dx_crys_kernel.h
dx_host.h
dx_reg_common.h
hash_defs.h
Kconfig
Makefile
ssi_aead.c
ssi_aead.h
ssi_buffer_mgr.c
ssi_buffer_mgr.h
ssi_cipher.c
ssi_cipher.h
ssi_config.h
ssi_driver.c
ssi_driver.h
ssi_fips.c
ssi_fips.h
ssi_hash.c staging: ccree: fix leak of import() after init() 2017-11-28 14:36:45 +01:00
ssi_hash.h
ssi_ivgen.c
ssi_ivgen.h
ssi_pm.c
ssi_pm.h
ssi_request_mgr.c
ssi_request_mgr.h
ssi_sram_mgr.c
ssi_sram_mgr.h
ssi_sysfs.c
ssi_sysfs.h
TODO