ima: do not measure or appraise the NSFS filesystem
authorMimi Zohar <zohar@linux.vnet.ibm.com>
Tue, 21 Apr 2015 20:54:24 +0000 (16:54 -0400)
committerMimi Zohar <zohar@linux.vnet.ibm.com>
Thu, 21 May 2015 17:28:41 +0000 (13:28 -0400)
Include don't appraise or measure rules for the NSFS filesystem
in the builtin ima_tcb and ima_appraise_tcb policies.

Changelog:
- Update documentation

Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org # 3.19
Documentation/ABI/testing/ima_policy
security/integrity/ima/ima_policy.c

index 232e174aa5de56460caff8ca54feada83e0599b9..8ae3f57090d48ff01f3ac71785d30a48646304c8 100644 (file)
@@ -65,6 +65,9 @@ Description:
                        # CGROUP_SUPER_MAGIC
                        dont_measure fsmagic=0x27e0eb
                        dont_appraise fsmagic=0x27e0eb
+                       # NSFS_MAGIC
+                       dont_measure fsmagic=0x6e736673
+                       dont_appraise fsmagic=0x6e736673
 
                        measure func=BPRM_CHECK
                        measure func=FILE_MMAP mask=MAY_EXEC
index e4244fc43cf10caf62618cebe5bf5e4c65c65b08..f2421f7fa3c8d80620de353bfc3af5d73b043f4a 100644 (file)
@@ -81,6 +81,7 @@ static struct ima_rule_entry default_rules[] = {
        {.action = DONT_MEASURE, .fsmagic = SELINUX_MAGIC, .flags = IMA_FSMAGIC},
        {.action = DONT_MEASURE, .fsmagic = CGROUP_SUPER_MAGIC,
         .flags = IMA_FSMAGIC},
+       {.action = DONT_MEASURE, .fsmagic = NSFS_MAGIC, .flags = IMA_FSMAGIC},
        {.action = MEASURE, .func = MMAP_CHECK, .mask = MAY_EXEC,
         .flags = IMA_FUNC | IMA_MASK},
        {.action = MEASURE, .func = BPRM_CHECK, .mask = MAY_EXEC,
@@ -101,6 +102,7 @@ static struct ima_rule_entry default_appraise_rules[] = {
        {.action = DONT_APPRAISE, .fsmagic = BINFMTFS_MAGIC, .flags = IMA_FSMAGIC},
        {.action = DONT_APPRAISE, .fsmagic = SECURITYFS_MAGIC, .flags = IMA_FSMAGIC},
        {.action = DONT_APPRAISE, .fsmagic = SELINUX_MAGIC, .flags = IMA_FSMAGIC},
+       {.action = DONT_APPRAISE, .fsmagic = NSFS_MAGIC, .flags = IMA_FSMAGIC},
        {.action = DONT_APPRAISE, .fsmagic = CGROUP_SUPER_MAGIC, .flags = IMA_FSMAGIC},
 #ifndef CONFIG_IMA_APPRAISE_SIGNED_INIT
        {.action = APPRAISE, .fowner = GLOBAL_ROOT_UID, .flags = IMA_FOWNER},