linux-stable/security/integrity
Xiu Jianfeng eaba2df235 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>
2023-01-07 12:07:16 +01:00
..
evm evm: mark evm_fixmode as __ro_after_init 2021-11-26 11:48:23 +01:00
ima ima: Fix misuse of dereference of pointer in template_desc_init_fields() 2023-01-07 12:07:16 +01:00
Kconfig security: integrity: Remove select to deleted option PUBLIC_KEY_ALGO_RSA 2016-04-12 19:54:58 +01:00
Makefile
digsig.c integrity/security: fix digsig.c build error with header file 2018-05-30 07:50:30 +02:00
digsig_asymmetric.c X.509: Make algo identifiers text instead of enum 2016-03-03 21:49:27 +00:00
iint.c ima: re-initialize iint->atomic_flags 2018-12-01 09:44:26 +01:00
integrity.h ima: re-introduce own integrity cache lock 2018-12-01 09:44:26 +01:00
integrity_audit.c integrity: check the return value of audit_log_start() 2022-02-16 12:43:52 +01:00