kernel_optimize_test/security
Li Huafei 6b4b3b8404 ima: Fix the error code for restoring the PCR value
[ Upstream commit 7990ccafaa37dc6d8bb095d4d7cd997e8903fd10 ]

In ima_restore_measurement_list(), hdr[HDR_PCR].data is pointing to a
buffer of type u8, which contains the dumped 32-bit pcr value.
Currently, only the least significant byte is used to restore the pcr
value. We should convert hdr[HDR_PCR].data to a pointer of type u32
before fetching the value to restore the correct pcr value.

Fixes: 47fdee60b4 ("ima: use ima_parse_buf() to parse measurements headers")
Signed-off-by: Li Huafei <lihuafei1@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>
2021-05-14 09:50:30 +02:00
..
apparmor
bpf
integrity ima: Fix the error code for restoring the PCR value 2021-05-14 09:50:30 +02:00
keys security: keys: trusted: fix TPM2 authorizations 2021-05-14 09:50:20 +02:00
loadpin
lockdown
safesetid
selinux selinux: add proper NULL termination to the secclass_map permissions 2021-05-14 09:49:59 +02:00
smack
tomoyo
yama
commoncap.c security: commoncap: fix -Wstringop-overread warning 2021-05-11 14:47:36 +02:00
device_cgroup.c
inode.c
Kconfig
Kconfig.hardening
lsm_audit.c
Makefile
min_addr.c
security.c