linux-stable/security/integrity
Xiu Jianfeng 62251948e2 ima: Fix misuse of dereference of pointer in template_desc_init_fields()
[ Upstream commit 25369175ce ]

The input parameter @fields is type of struct ima_template_field ***, so
when allocates array memory for @fields, the size of element should be
sizeof(**field) instead of sizeof(*field).

Actually the original code would not cause any runtime error, but it's
better to make it logically right.

Fixes: adf53a778a ("ima: new templates management mechanism")
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Reviewed-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:14:10 +01:00
..
evm Revert "evm: Fix memleak in init_desc" 2022-07-21 21:24:14 +02:00
ima ima: Fix misuse of dereference of pointer in template_desc_init_fields() 2022-12-31 13:14:10 +01:00
platform_certs efi: Correct Macmini DMI match in uefi cert quirk 2022-10-15 07:59:01 +02:00
digsig.c integrity: Fix memory leakage in keyring allocation error path 2022-12-31 13:14:10 +01:00
digsig_asymmetric.c ima: fix reference leak in asymmetric_verify() 2022-02-16 12:56:03 +01:00
iint.c evm: Load EVM key in ima_load_x509() to avoid appraisal 2021-05-21 12:47:04 -04:00
integrity.h
integrity_audit.c integrity: check the return value of audit_log_start() 2022-02-16 12:56:03 +01:00
Kconfig
Makefile