Please pull the following fix for a user-triggerable oops, present since 
b5e95b48685e3481139a5634d14d630d12c7d5ce .


The following changes since commit e12ca23d41bd157354a5d1aadff30211a410c53a:
  Linus Torvalds (1):
        Merge git://git.kernel.org/.../rusty/linux-2.6-for-linus

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6 
for-linus

Kees Cook (1):
      AppArmor: fix oops in apparmor_setprocattr

--

 security/apparmor/lsm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
commit a5b2c5b2ad5853591a6cac6134cd0f599a720865
Author: Kees Cook <[email protected]>
Date:   Tue May 31 11:31:41 2011 -0700

    AppArmor: fix oops in apparmor_setprocattr
    
    When invalid parameters are passed to apparmor_setprocattr a NULL deref
    oops occurs when it tries to record an audit message. This is because
    it is passing NULL for the profile parameter for aa_audit. But aa_audit
    now requires that the profile passed is not NULL.
    
    Fix this by passing the current profile on the task that is trying to
    setprocattr.
    
    Signed-off-by: Kees Cook <[email protected]>
    Signed-off-by: John Johansen <[email protected]>
    Cc: [email protected]
    Signed-off-by: James Morris <[email protected]>

diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index ae3a698..ec1bcec 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -593,7 +593,8 @@ static int apparmor_setprocattr(struct task_struct *task, 
char *name,
                        sa.aad.op = OP_SETPROCATTR;
                        sa.aad.info = name;
                        sa.aad.error = -EINVAL;
-                       return aa_audit(AUDIT_APPARMOR_DENIED, NULL, GFP_KERNEL,
+                       return aa_audit(AUDIT_APPARMOR_DENIED,
+                                       __aa_current_profile(), GFP_KERNEL,
                                        &sa, NULL);
                }
        } else if (strcmp(name, "exec") == 0) {

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

Reply via email to