linux_dsm_epyc7002/security/integrity/ima
Mimi Zohar da1b0029f5 ima: support new "hash" and "dont_hash" policy actions
The builtin ima_appraise_tcb policy, which is specified on the boot
command line, can be replaced with a custom policy, normally early in
the boot process.  Custom policies can be more restrictive in some ways,
like requiring file signatures, but can be less restrictive in other
ways, like not appraising mutable files.  With a less restrictive policy
in place, files in the builtin policy might not be hashed and labeled
with a security.ima hash.  On reboot, files which should be labeled in
the ima_appraise_tcb are not labeled, possibly preventing the system
from booting properly.

To resolve this problem, this patch extends the existing IMA policy
actions "measure", "dont_measure", "appraise", "dont_appraise", and
"audit" with "hash" and "dont_hash".  The new "hash" action will write
the file hash as security.ima, but without requiring the file to be
appraised as well.

For example, the builtin ima_appraise_tcb policy includes the rule,
"appraise fowner=0".  Adding the "hash fowner=0" rule to a custom
policy, will cause the needed file hashes to be calculated and written
as security.ima xattrs.

Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
2017-12-18 09:43:38 -05:00
..
ima_api.c ima: support new "hash" and "dont_hash" policy actions 2017-12-18 09:43:38 -05:00
ima_appraise.c ima: support new "hash" and "dont_hash" policy actions 2017-12-18 09:43:38 -05:00
ima_crypto.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-11-14 10:52:09 -08:00
ima_fs.c ima: Fix bool initialization/comparison 2017-11-08 15:16:36 -05:00
ima_init.c
ima_kexec.c
ima_main.c ima: support new "hash" and "dont_hash" policy actions 2017-12-18 09:43:38 -05:00
ima_mok.c
ima_policy.c ima: support new "hash" and "dont_hash" policy actions 2017-12-18 09:43:38 -05:00
ima_queue.c
ima_template_lib.c
ima_template_lib.h
ima_template.c
ima.h ima: Simplify policy_func_show. 2017-06-21 14:37:12 -04:00
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00