]> git.baikalelectronics.ru Git - kernel.git/commit
ima: Fail rule parsing when appraise_flag=blacklist is unsupportable
authorTyler Hicks <tyhicks@linux.microsoft.com>
Thu, 9 Jul 2020 06:19:06 +0000 (01:19 -0500)
committerMimi Zohar <zohar@linux.ibm.com>
Mon, 20 Jul 2020 17:06:26 +0000 (13:06 -0400)
commitac0d2ef7b9aaeaeabe22988ec9829aa80af62c5e
treeac5c817f82eff72c557ebfa6ee21221bedd0ad77
parentbc4f26fe0340c1c56c6f2c553c8b6e6602d07ca9
ima: Fail rule parsing when appraise_flag=blacklist is unsupportable

Verifying that a file hash is not blacklisted is currently only
supported for files with appended signatures (modsig).  In the future,
this might change.

For now, the "appraise_flag" option is only appropriate for appraise
actions and its "blacklist" value is only appropriate when
CONFIG_IMA_APPRAISE_MODSIG is enabled and "appraise_flag=blacklist" is
only appropriate when "appraise_type=imasig|modsig" is also present.
Make this clear at policy load so that IMA policy authors don't assume
that other uses of "appraise_flag=blacklist" are supported.

Fixes: 3bfd8d6046d6 ("ima: Check against blacklisted hashes for files with modsig")
Signed-off-by: Tyler Hicks <tyhicks@linux.microsoft.com>
Reivewed-by: Nayna Jain <nayna@linux.ibm.com>
Tested-by: Nayna Jain <nayna@linux.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
security/integrity/ima/ima_policy.c