linux/security/integrity/ima
Roberto Sassu 4958db3245 ima: Introduce MMAP_CHECK_REQPROT hook
Commit 98de59bfe4 ("take calculation of final prot in
security_mmap_file() into a helper") caused ima_file_mmap() to receive the
protections requested by the application and not those applied by the
kernel.

After restoring the original MMAP_CHECK behavior, existing attestation
servers might be broken due to not being ready to handle new entries
(previously missing) in the IMA measurement list.

Restore the original correct MMAP_CHECK behavior, instead of keeping the
current buggy one and introducing a new hook with the correct behavior.
Otherwise, there would have been the risk of IMA users not noticing the
problem at all, as they would actively have to update the IMA policy, to
switch to the correct behavior.

Also, introduce the new MMAP_CHECK_REQPROT hook to keep the current
behavior, so that IMA users could easily fix a broken attestation server,
although this approach is discouraged due to potentially missing
measurements.

Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
2023-01-31 13:08:39 -05:00
..
ima_api.c ima: Introduce MMAP_CHECK_REQPROT hook 2023-01-31 13:08:39 -05:00
ima_appraise.c ima: Introduce MMAP_CHECK_REQPROT hook 2023-01-31 13:08:39 -05:00
ima_asymmetric_keys.c ima: Add digest and digest_len params to the functions to measure a buffer 2021-07-23 09:27:02 -04:00
ima_crypto.c ima: Fix potential memory leak in ima_init_crypto() 2022-07-13 10:13:58 -04:00
ima_efi.c ima: force signature verification when CONFIG_KEXEC_SIG is configured 2022-07-13 10:13:41 -04:00
ima_fs.c ima: Return error code obtained from securityfs functions 2022-02-15 11:17:01 -05:00
ima_init.c ima: define ima_max_digest_data struct without a flexible array variable 2022-02-15 11:52:06 -05:00
ima_kexec.c x86/kexec: Carry forward IMA measurement log on kexec 2022-07-01 15:22:16 +02:00
ima_main.c ima: Introduce MMAP_CHECK_REQPROT hook 2023-01-31 13:08:39 -05: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 IMA: remove -Wmissing-prototypes warning 2021-07-23 08:05:06 -04:00
ima_policy.c ima: Introduce MMAP_CHECK_REQPROT hook 2023-01-31 13:08:39 -05:00
ima_queue_keys.c ima: Add digest and digest_len params to the functions to measure a buffer 2021-07-23 09:27:02 -04:00
ima_queue.c IMA: support for duplicate measurement records 2021-06-11 12:54:13 -04:00
ima_template_lib.c lsm,fs: fix vfs_getxattr_alloc() return type and caller error paths 2022-11-18 17:07:03 -05:00
ima_template_lib.h ima: define a new template field named 'd-ngv2' and templates 2022-05-05 11:49:13 -04:00
ima_template.c ima: Fix misuse of dereference of pointer in template_desc_init_fields() 2022-11-16 11:47:55 -05:00
ima.h ima: Introduce MMAP_CHECK_REQPROT hook 2023-01-31 13:08:39 -05:00
Kconfig ima: Fix hash dependency to correct algorithm 2022-11-28 16:44:34 -05:00
Makefile ima: generalize x86/EFI arch glue for other EFI architectures 2020-11-06 07:40:42 +01:00