The patch titled
     ima: fix add LSM rule bug
has been added to the -mm tree.  Its filename is
     ima-fix-add-lsm-rule-bug.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: ima: fix add LSM rule bug
From: Mimi Zohar <[email protected]>

If security_filter_rule_init() doesn't return a rule, then not everything
is as fine as the return code implies.

This bug only occurs when the LSM (eg. SELinux) is disabled at runtime.

Signed-off-by: Mimi Zohar <[email protected]>
Cc: James Morris <[email protected]>
Acked-by: Serge Hallyn <[email protected]>
Cc: David Safford <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 security/integrity/ima/ima_policy.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN security/integrity/ima/ima_policy.c~ima-fix-add-lsm-rule-bug 
security/integrity/ima/ima_policy.c
--- a/security/integrity/ima/ima_policy.c~ima-fix-add-lsm-rule-bug
+++ a/security/integrity/ima/ima_policy.c
@@ -253,6 +253,8 @@ static int ima_lsm_rule_init(struct ima_
        result = security_filter_rule_init(entry->lsm[lsm_rule].type,
                                           Audit_equal, args,
                                           &entry->lsm[lsm_rule].rule);
+       if (!entry->lsm[lsm_rule].rule)
+               return -EINVAL;
        return result;
 }
 
_

Patches currently in -mm which might be from [email protected] are

linux-next.patch
ima-fix-add-lsm-rule-bug.patch

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to