OrangePi_CM5/security/integrity/ima
Jianglei Nie c1d9702ceb ima: Fix potential memory leak in ima_init_crypto()
[ Upstream commit 067d2521874135267e681c19d42761c601d503d6 ]

On failure to allocate the SHA1 tfm, IMA fails to initialize and exits
without freeing the ima_algo_array. Add the missing kfree() for
ima_algo_array to avoid the potential memory leak.

Signed-off-by: Jianglei Nie <niejianglei2021@163.com>
Fixes: 6d94809af6 ("ima: Allocate and initialize tfm for each PCR bank")
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-07-21 21:20:11 +02:00
..
Kconfig ima: remove the IMA_TEMPLATE Kconfig option 2022-06-09 10:21:25 +02:00
Makefile
…
ima.h
…
ima_api.c
…
ima_appraise.c ima: Fix a potential integer overflow in ima_appraise_measurement 2022-07-21 21:20:04 +02:00
ima_asymmetric_keys.c
…
ima_crypto.c ima: Fix potential memory leak in ima_init_crypto() 2022-07-21 21:20:11 +02:00
ima_fs.c ima: Remove ima_policy file before directory 2022-02-16 12:54:16 +01:00
ima_init.c
…
ima_kexec.c
…
ima_main.c
…
ima_modsig.c
…
ima_mok.c IMA: remove -Wmissing-prototypes warning 2021-09-15 09:50:48 +02:00
ima_policy.c ima: Do not print policy rule with inactive LSM labels 2022-02-16 12:54:16 +01:00
ima_queue.c
…
ima_queue_keys.c
…
ima_template.c ima: Allow template selection with ima_template[_fmt]= after ima_hash= 2022-02-16 12:54:16 +01:00
ima_template_lib.c
…
ima_template_lib.h
…