linux/security/integrity/ima
Mimi Zohar 30511f37c9 ima: detect changes to the backing overlay file
[ Upstream commit b836c4d29f ]

Commit 18b44bc5a6 ("ovl: Always reevaluate the file signature for
IMA") forced signature re-evaulation on every file access.

Instead of always re-evaluating the file's integrity, detect a change
to the backing file, by comparing the cached file metadata with the
backing file's metadata.  Verifying just the i_version has not changed
is insufficient.  In addition save and compare the i_ino and s_dev
as well.

Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Tested-by: Eric Snowberg <eric.snowberg@oracle.com>
Tested-by: Raul E Rangel <rrangel@chromium.org>
Cc: stable@vger.kernel.org
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-08 08:44:27 +01:00
..
ima_api.c ima: detect changes to the backing overlay file 2023-12-08 08:44:27 +01:00
ima_appraise.c ima: Fix a potential integer overflow in ima_appraise_measurement 2022-07-21 20:59:19 +02:00
ima_crypto.c ima: Don't modify file descriptor mode on the fly 2020-12-30 11:51:39 +01:00
ima_fs.c ima: Remove ima_policy file before directory 2022-02-16 12:52:47 +01:00
ima_init.c ima: Call ima_calc_boot_aggregate() in ima_eventdigest_init() 2020-06-22 09:31:15 +02:00
ima_kexec.c ima: Free IMA measurement buffer after kexec syscall 2021-03-04 10:26:25 +01:00
ima_main.c ima: detect changes to the backing overlay file 2023-12-08 08:44:27 +01:00
ima_modsig.c ima: Fix build warnings 2023-07-27 08:37:06 +02:00
ima_mok.c IMA: remove -Wmissing-prototypes warning 2021-09-15 09:47:41 +02:00
ima_policy.c ima: Fix build warnings 2023-07-27 08:37:06 +02:00
ima_queue.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
ima_template_lib.c ima: Call ima_calc_boot_aggregate() in ima_eventdigest_init() 2020-06-22 09:31:15 +02:00
ima_template_lib.h ima: Define ima-modsig template 2019-08-05 18:40:25 -04:00
ima_template.c ima: Fix a potential NULL pointer access in ima_restore_measurement_list 2023-01-18 11:41:49 +01:00
ima.h ima: Rename internal filter rule functions 2023-01-18 11:41:01 +01:00
Kconfig ima: rework CONFIG_IMA dependency block 2023-10-10 21:46:46 +02:00
Makefile ima: Add modsig appraise_type option for module-style appended signatures 2019-08-05 18:40:21 -04:00