Skip to contentSkip to conversation

Patch "apparmor: fix leak of null profile name if profile allocation fails" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Dec 12, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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 <[email protected]> know about it.

Quoted 1 line

From foo@baz Tue Dec 12 10:32:42 CET 2017

From: John Johansen <[email protected]>
Date: Wed, 15 Nov 2017 15:25:30 -0800
Subject: apparmor: fix leak of null profile name if profile allocation fails

From: John Johansen <[email protected]>

[ Upstream commit 4633307e5ed6128975595df43f796a10c41d11c1 ]

Fixes d07881d2edb0 ("apparmor: move new_null_profile to after profile lookup fns()")
---
 security/apparmor/policy.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
security/apparmor/policy.c +2 -1
@@ -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 [email protected] are

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