Previous versions included the patch 'ima: don't ignore INTEGRITY_UNKNOWN
EVM status'. However, I realized that this patch cannot be accepted alone
because IMA-Appraisal would deny access to new files created during the
boot. With the current behavior, those files are accessible because they
have a valid security.ima (not protected by EVM) created after the first
write.
A solution for this problem is to initialize EVM very early with a random
key. Access to created files will be granted, even with the strict
appraisal, because after the first write those files will have both
security.ima and security.evm (HMAC calculated with the random key).
Strict appraisal will work only if it is done with signatures until the
persistent HMAC key is loaded.
Roberto Sassu (2):
evm: add option to set a random HMAC key at early boot
ima: add enforce-evm and log-evm modes to strictly check EVM status
.../admin-guide/kernel-parameters.txt | 11 ++--
security/integrity/evm/evm.h | 10 +++-
security/integrity/evm/evm_crypto.c | 57 ++++++++++++++++---
security/integrity/evm/evm_main.c | 41 ++++++++++---
security/integrity/ima/ima_appraise.c | 8 +++
security/integrity/integrity.h | 1 +
6 files changed, 106 insertions(+), 22 deletions(-)