android_kernel_xiaomi_sdm845/security
Xiu Jianfeng eaba2df235 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-07 12:07:16 +01:00
..
apparmor
integrity ima: Fix misuse of dereference of pointer in template_desc_init_fields() 2023-01-07 12:07:16 +01:00
keys KEYS: trusted: Fix migratable=1 failing 2021-03-03 17:44:42 +01:00
loadpin
selinux selinux: fix inode_doinit_with_dentry() LABEL_INVALID error handling 2022-08-25 11:09:22 +02:00
smack security,selinux,smack: kill security_task_wait hook 2022-07-29 17:05:44 +02:00
tomoyo TOMOYO: fix __setup handlers return values 2022-04-20 09:06:35 +02:00
yama
commoncap.c exec: Always set cap_ambient in cap_bprm_set_creds 2020-06-03 08:16:41 +02:00
device_cgroup.c
inode.c
Kconfig
lsm_audit.c dump_common_audit_data(): fix racy accesses to ->d_name 2021-01-23 15:38:17 +01:00
Makefile
min_addr.c
security.c security,selinux,smack: kill security_task_wait hook 2022-07-29 17:05:44 +02:00