mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Fix leak when AppArmor encounters a deleted file
This commit is contained in:
parent
59f0d08417
commit
01519b3ae0
2 changed files with 19 additions and 0 deletions
18
kernel-patches/2.6.28/fix-deleted-leak.diff
Normal file
18
kernel-patches/2.6.28/fix-deleted-leak.diff
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
security/apparmor/main.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/security/apparmor/main.c
|
||||
+++ b/security/apparmor/main.c
|
||||
@@ -503,10 +503,10 @@ static char *aa_get_name(struct dentry *
|
||||
*buffer = buf;
|
||||
return name;
|
||||
}
|
||||
+ kfree(buf);
|
||||
if (PTR_ERR(name) != -ENAMETOOLONG)
|
||||
return name;
|
||||
|
||||
- kfree(buf);
|
||||
size <<= 1;
|
||||
if (size > apparmor_path_max)
|
||||
return ERR_PTR(-ENAMETOOLONG);
|
|
@ -62,3 +62,4 @@ fix-config.diff
|
|||
AppArmor-checkpatch.diff
|
||||
AppArmor-misc-cleanups.diff
|
||||
fix-config-builtin.diff
|
||||
fix-deleted-leak.diff
|
||||
|
|
Loading…
Add table
Reference in a new issue