linux-stable/security/integrity
Li Huafei 6b4b3b8404 ima: Fix the error code for restoring the PCR value
[ Upstream commit 7990ccafaa ]

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
..
evm evm: Fix memleak in init_desc 2021-03-04 11:37:40 +01:00
ima ima: Fix the error code for restoring the PCR value 2021-05-14 09:50:30 +02:00
platform_certs integrity: Load certs from the EFI MOK config table 2020-09-16 18:53:42 +03:00
digsig.c fs/kernel_file_read: Add "offset" arg for partial reads 2020-10-05 13:37:04 +02:00
digsig_asymmetric.c integrity-v5.10 2020-10-15 15:58:18 -07:00
iint.c integrity: double check iint_cache was initialized 2021-03-30 14:31:55 +02:00
integrity.h integrity: Add errno field in audit message 2020-07-16 21:48:11 -04:00
integrity_audit.c integrity: Use current_uid() in integrity_audit_message() 2020-08-31 17:46:50 -04:00
Kconfig powerpc: Load firmware trusted keys/hashes into kernel keyring 2019-11-13 00:33:23 +11:00
Makefile powerpc: Load firmware trusted keys/hashes into kernel keyring 2019-11-13 00:33:23 +11:00