linux/security/integrity/ima
Tushar Sugandhi 52c208397c IMA: support for duplicate measurement records
IMA measures contents of a given file/buffer/critical-data record,
and properly re-measures it on change.  However, IMA does not measure
the duplicate value for a given record, since TPM extend is a very
expensive operation.  For example, if the record changes from value
'v#1' to 'v#2', and then back to 'v#1', IMA will not measure and log
the last change to 'v#1', since the hash of 'v#1' for that record is
already present in the IMA htable.  This limits the ability of an
external attestation service to accurately determine the current state
of the system.  The service would incorrectly conclude that the latest
value of the given record on the system is 'v#2', and act accordingly.

Define and use a new Kconfig option IMA_DISABLE_HTABLE to permit
duplicate records in the IMA measurement list.

In addition to the duplicate measurement records described above,
other duplicate file measurement records may be included in the log,
when CONFIG_IMA_DISABLE_HTABLE is enabled.  For example,
    - i_version is not enabled,
    - i_generation changed,
    - same file present on different filesystems,
    - an inode is evicted from dcache

Signed-off-by: Tushar Sugandhi <tusharsu@linux.microsoft.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
[zohar@linux.ibm.com: updated list of duplicate measurement records]
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2021-06-11 12:54:13 -04:00
..
ima_api.c idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
ima_appraise.c ima: differentiate between EVM failures in the audit log 2021-06-10 16:36:41 -04:00
ima_asymmetric_keys.c ima: Include header defining ima_post_key_create_or_update() 2021-06-08 16:29:10 -04:00
ima_crypto.c ima/evm: Fix type mismatch 2021-06-08 16:29:10 -04:00
ima_efi.c ima: generalize x86/EFI arch glue for other EFI architectures 2020-11-06 07:40:42 +01:00
ima_fs.c ima/evm: Fix type mismatch 2021-06-08 16:29:10 -04:00
ima_init.c evm: Load EVM key in ima_load_x509() to avoid appraisal 2021-05-21 12:47:04 -04:00
ima_kexec.c ima: Fix warning: no previous prototype for function 'ima_add_kexec_buffer' 2021-06-11 11:27:03 -04:00
ima_main.c ima: Pass NULL instead of 0 to ima_get_action() in ima_file_mprotect() 2021-06-08 16:29:10 -04:00
ima_modsig.c ima: Move comprehensive rule validation checks out of the token parser 2020-07-20 13:28:15 -04:00
ima_mok.c certs: Fix blacklist flag type confusion 2021-01-21 16:16:10 +00:00
ima_policy.c ima: Fix fall-through warnings for Clang 2021-04-20 16:54:14 -04:00
ima_queue_keys.c idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
ima_queue.c IMA: support for duplicate measurement records 2021-06-11 12:54:13 -04:00
ima_template_lib.c ima: Fix fall-through warning for Clang 2021-06-08 23:33:48 -04:00
ima_template_lib.h ima: Define new template fields xattrnames, xattrlengths and xattrvalues 2021-06-02 18:56:13 -04:00
ima_template.c ima: Set correct casting types 2021-06-08 16:29:10 -04:00
ima.h powerpc: Move arch independent ima kexec functions to drivers/of/kexec.c 2021-03-08 12:06:29 -07:00
Kconfig IMA: support for duplicate measurement records 2021-06-11 12:54:13 -04:00
Makefile ima: generalize x86/EFI arch glue for other EFI architectures 2020-11-06 07:40:42 +01:00