Commit 8636b1db authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'apparmor-pr-2019-03-12' of...

Merge tag 'apparmor-pr-2019-03-12' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor

Pull apparmor fixes from John Johansen:

 - fix double when failing to unpack secmark rules in policy

 - fix leak of dentry when profile is removed

* tag 'apparmor-pr-2019-03-12' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor:
  apparmor: fix double free when unpack of secmark rules fails
  apparmor: delete the dentry in aafs_remove() to avoid a leak
  apparmor: Fix warning about unused function apparmor_ipv6_postroute
parents 5453a3df d8dbb581
...@@ -356,6 +356,7 @@ static void aafs_remove(struct dentry *dentry) ...@@ -356,6 +356,7 @@ static void aafs_remove(struct dentry *dentry)
simple_rmdir(dir, dentry); simple_rmdir(dir, dentry);
else else
simple_unlink(dir, dentry); simple_unlink(dir, dentry);
d_delete(dentry);
dput(dentry); dput(dentry);
} }
inode_unlock(dir); inode_unlock(dir);
......
...@@ -579,6 +579,7 @@ static bool unpack_secmark(struct aa_ext *e, struct aa_profile *profile) ...@@ -579,6 +579,7 @@ static bool unpack_secmark(struct aa_ext *e, struct aa_profile *profile)
kfree(profile->secmark[i].label); kfree(profile->secmark[i].label);
kfree(profile->secmark); kfree(profile->secmark);
profile->secmark_count = 0; profile->secmark_count = 0;
profile->secmark = NULL;
} }
e->pos = pos; e->pos = pos;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment