kernel_optimize_test/security/integrity
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
..
evm Revert "evm: Fix memleak in init_desc" 2022-07-21 21:20:02 +02:00
ima ima: Fix potential memory leak in ima_init_crypto() 2022-07-21 21:20:11 +02:00
platform_certs efi: Do not import certificates from UEFI Secure Boot for T2 Macs 2022-06-09 10:21:22 +02:00
digsig_asymmetric.c integrity-v5.10 2020-10-15 15:58:18 -07:00
digsig.c fs/kernel_file_read: Add "offset" arg for partial reads 2020-10-05 13:37:04 +02:00
iint.c integrity: double check iint_cache was initialized 2021-03-30 14:31:55 +02:00
integrity_audit.c integrity: check the return value of audit_log_start() 2022-02-16 12:54:16 +01:00
integrity.h integrity: Add errno field in audit message 2020-07-16 21:48:11 -04:00
Kconfig powerpc: Load firmware trusted keys/hashes into kernel keyring 2019-11-13 00:33:23 +11:00
Makefile powerpc: Load firmware trusted keys/hashes into kernel keyring 2019-11-13 00:33:23 +11:00