android_kernel_asus_sm8350/security/integrity
Xiu Jianfeng 8176538866 ima: Fix misuse of dereference of pointer in template_desc_init_fields()
[ Upstream commit 25369175ce84813dd99d6604e710dc2491f68523 ]

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>
2023-01-18 11:41:03 +01:00
..
evm Revert "evm: Fix memleak in init_desc" 2022-07-21 20:59:18 +02:00
ima ima: Fix misuse of dereference of pointer in template_desc_init_fields() 2023-01-18 11:41:03 +01:00
platform_certs efi: Correct Macmini DMI match in uefi cert quirk 2022-10-15 07:54:39 +02:00
digsig_asymmetric.c Revert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs" 2019-07-10 18:43:43 -07:00
digsig.c integrity: Fix memory leakage in keyring allocation error path 2023-01-18 11:41:03 +01:00
iint.c integrity: double check iint_cache was initialized 2021-03-30 14:35:24 +02:00
integrity_audit.c integrity: check the return value of audit_log_start() 2022-02-16 12:52:47 +01:00
integrity.h ima: Implement support for module-style appended signatures 2019-08-05 18:40:23 -04:00
Kconfig integrity: Select CONFIG_KEYS instead of depending on it 2019-08-05 18:40:20 -04:00
Makefile x86/efi: move common keyring handler functions to new file 2021-06-30 08:47:55 -04:00