[PATCH 1/5] UBUNTU: SAUCE: AppArmor: Fix oops after profile removal
Andy Whitcroft
apw at canonical.com
Thu Nov 12 13:06:02 UTC 2009
On Tue, Nov 10, 2009 at 10:29:09AM -0800, John Johansen wrote:
> BugLink: http://bugs.launchpad.net/bugs/475619
>
> SRU Justicication: this bug can cause a null pointer dereference kernel
> oops. This will occur any time children profiles are attached to running
> processes. This can occur when change_hat, children profiles or profile
> learning is used.
> ---
> ubuntu/apparmor/policy.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/ubuntu/apparmor/policy.c b/ubuntu/apparmor/policy.c
> index 390bbf6..a772801 100644
> --- a/ubuntu/apparmor/policy.c
> +++ b/ubuntu/apparmor/policy.c
> @@ -322,7 +322,7 @@ void __aa_remove_profile(struct aa_profile *profile,
> if (replacement)
> profile->replacedby = aa_get_profile(replacement);
> else
> - profile->replacedby = ERR_PTR(-EINVAL);
> + profile->replacedby = aa_get_profile(profile->ns->unconfined);
> list_del_init(&profile->base.list);
> if (!(profile->flags & PFLAG_NO_LIST_REF))
> aa_put_profile(profile);
> --
Based on JJ's replies to smb I think this one is ok.
Acked-by: Andy Whitcroft <apw at canonical.com>
-apw
More information about the kernel-team
mailing list