linux/drivers/staging/ccree
Gilad Ben-Yossef a633c7ed4a staging: ccree: fix leak of import() after init()
commit c5f39d0786 upstream.

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")
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>
History 2017-12-10 13:40:44 +01:00
..
Documentation/devicetree/bindings/crypto staging: ccree: add DT bindings for Arm CryptoCell 2017-04-28 12:17:54 +02:00
cc_crypto_ctx.h staging: ccree: remove descriptor context definitions 2017-06-04 10:16:26 +02:00
cc_hal.h staging: ccree: resolve possible macro issue in cc_hal.h 2017-05-15 07:41:57 +02:00
cc_hw_queue_defs.h staging: ccree: move comment to fit coding style 2017-07-16 08:41:02 +02:00
cc_lli_defs.h staging: ccree: fix 64 bit scatter/gather DMA ops 2017-11-21 09:49:24 +01:00
cc_regs.h staging: ccree: remove spurious blank line 2017-06-04 10:16:26 +02:00
dx_crys_kernel.h staging: ccree: fix wrong whitespace usage 2017-06-04 10:16:26 +02:00
dx_host.h staging: ccree: fix wrong whitespace usage 2017-06-04 10:16:26 +02:00
dx_reg_base_host.h staging: ccree: remove unused code 2017-05-15 07:41:59 +02:00
dx_reg_common.h staging: ccree: Strip trailing whitespace 2017-05-15 07:41:57 +02:00
hash_defs.h staging: ccree: remove dead code 2017-06-04 10:16:25 +02:00
Kconfig staging: ccree: move FIPS support to kernel infrastructure 2017-07-16 08:40:57 +02:00
Makefile staging: ccree: move FIPS support to kernel infrastructure 2017-07-16 08:40:57 +02:00
ssi_aead.c staging: ccree: Use sizeof(variable) in memory allocs 2017-08-16 15:10:42 -07:00
ssi_aead.h staging: ccree: CamelCase to snake_case in aead struct 2017-07-16 08:41:01 +02:00
ssi_buffer_mgr.c staging: ccree: Fix alignment issues in ssi_buffer_mgr.c 2017-07-27 21:53:21 -07:00
ssi_buffer_mgr.h staging: ccree: remove/add (un)needed blank lines 2017-06-29 16:38:51 +02:00
ssi_cipher.c staging: ccree: save ciphertext for CTS IV 2017-08-23 16:22:35 -07:00
ssi_cipher.h staging: ccree: remove/add (un)needed blank lines 2017-06-29 16:38:51 +02:00
ssi_config.h staging: ccree: add DT bus coherency detection 2017-06-25 16:29:15 +02:00
ssi_driver.c staging: ccree: constify dev_pm_ops structures. 2017-08-16 15:10:42 -07:00
ssi_driver.h staging: ccree: move FIPS support to kernel infrastructure 2017-07-16 08:40:57 +02:00
ssi_fips.c staging: ccree: move FIPS support to kernel infrastructure 2017-07-16 08:40:57 +02:00
ssi_fips.h staging: ccree: move FIPS support to kernel infrastructure 2017-07-16 08:40:57 +02:00
ssi_hash.c staging: ccree: fix leak of import() after init() 2017-12-10 13:40:44 +01:00
ssi_hash.h staging: ccree: fix pointer location 2017-06-29 16:38:51 +02:00
ssi_ivgen.c staging: ccree: Use sizeof(variable) in memory allocs 2017-08-16 15:10:42 -07:00
ssi_ivgen.h staging: ccree: remove/add (un)needed blank lines 2017-06-29 16:38:51 +02:00
ssi_pm.c staging: ccree: remove func name from log messages 2017-07-27 21:54:06 -07:00
ssi_pm.h staging: ccree: remove/add (un)needed blank lines 2017-06-29 16:38:51 +02:00
ssi_request_mgr.c staging: ccree: Use sizeof(variable) in memory allocs 2017-08-16 15:10:42 -07:00
ssi_request_mgr.h staging: ccree: fix missing or redundant spaces 2017-06-29 16:38:50 +02:00
ssi_sram_mgr.c staging: ccree: Fix alignment issues in ssi_sram_mgr.c 2017-07-16 08:40:58 +02:00
ssi_sram_mgr.h staging: ccree: remove/add (un)needed blank lines 2017-06-29 16:38:51 +02:00
ssi_sysfs.c staging: ccree: remove whitespace before a quoted newline 2017-07-16 08:41:02 +02:00
ssi_sysfs.h staging: ccree: remove/add (un)needed blank lines 2017-06-29 16:38:51 +02:00
TODO staging: ccree: add TODO list 2017-04-28 12:17:54 +02:00