Skip to content

Commit 8636b1d

Browse files
committed
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
2 parents 5453a3d + d8dbb58 commit 8636b1d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

security/apparmor/apparmorfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ static void aafs_remove(struct dentry *dentry)
356356
simple_rmdir(dir, dentry);
357357
else
358358
simple_unlink(dir, dentry);
359+
d_delete(dentry);
359360
dput(dentry);
360361
}
361362
inode_unlock(dir);

security/apparmor/policy_unpack.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ static bool unpack_secmark(struct aa_ext *e, struct aa_profile *profile)
579579
kfree(profile->secmark[i].label);
580580
kfree(profile->secmark);
581581
profile->secmark_count = 0;
582+
profile->secmark = NULL;
582583
}
583584

584585
e->pos = pos;

0 commit comments

Comments
 (0)