stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "apparmor: fix leak of null profile name if profile allocation fails" has been added to the 4.14-stable tree
@ 2017-12-12 10:11 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-12-12 10:11 UTC (permalink / raw)
  To: john.johansen, alexander.levin, gregkh, seth.arnold
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    apparmor: fix leak of null profile name if profile allocation fails

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     apparmor-fix-leak-of-null-profile-name-if-profile-allocation-fails.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Tue Dec 12 10:32:42 CET 2017
From: John Johansen <john.johansen@canonical.com>
Date: Wed, 15 Nov 2017 15:25:30 -0800
Subject: apparmor: fix leak of null profile name if profile allocation fails

From: John Johansen <john.johansen@canonical.com>


[ Upstream commit 4633307e5ed6128975595df43f796a10c41d11c1 ]

Fixes: d07881d2edb0 ("apparmor: move new_null_profile to after profile lookup fns()")
Reported-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 security/apparmor/policy.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/security/apparmor/policy.c
+++ b/security/apparmor/policy.c
@@ -502,7 +502,7 @@ struct aa_profile *aa_new_null_profile(s
 {
 	struct aa_profile *p, *profile;
 	const char *bname;
-	char *name;
+	char *name = NULL;
 
 	AA_BUG(!parent);
 
@@ -562,6 +562,7 @@ out:
 	return profile;
 
 fail:
+	kfree(name);
 	aa_free_profile(profile);
 	return NULL;
 }


Patches currently in stable-queue which might be from john.johansen@canonical.com are

queue-4.14/apparmor-fix-leak-of-null-profile-name-if-profile-allocation-fails.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-12 10:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-12 10:11 Patch "apparmor: fix leak of null profile name if profile allocation fails" has been added to the 4.14-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).