Ack: Re: [maverick, maverick/ti-omap4, natty/ti-omap4 CVE 1/1] AppArmor: fix oops in apparmor_setprocattr
Herton Ronaldo Krzesinski
herton.krzesinski at canonical.com
Tue Feb 7 11:49:47 UTC 2012
On Tue, Feb 07, 2012 at 10:43:07AM +0000, Andy Whitcroft wrote:
> From: Kees Cook <kees.cook at canonical.com>
>
> 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 <kees at ubuntu.com>
> Signed-off-by: John Johansen <john.johansen at canonical.com>
> Cc: stable at kernel.org
> Signed-off-by: James Morris <jmorris at namei.org>
>
> (cherry picked from commit a5b2c5b2ad5853591a6cac6134cd0f599a720865)
> CVE-2011-3619
> BugLink: http://bugs.launchpad.net/bugs/789409
> Signed-off-by: Andy Whitcroft <apw at canonical.com>
> ---
> security/apparmor/lsm.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
> index e8d0821..04c708c 100644
> --- a/security/apparmor/lsm.c
> +++ b/security/apparmor/lsm.c
> @@ -594,7 +594,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) {
> --
> 1.7.8.3
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
More information about the kernel-team
mailing list