]> git.baikalelectronics.ru Git - kernel.git/commit
apparmor: fix memory leak when deduping profile load
authorJohn Johansen <john.johansen@canonical.com>
Sat, 14 Apr 2018 05:33:10 +0000 (22:33 -0700)
committerJohn Johansen <john.johansen@canonical.com>
Thu, 7 Jun 2018 08:51:01 +0000 (01:51 -0700)
commit5495a743e4c5184cfca9aff737d9601effeb7675
tree64527d11e578e1130953d468ff1aeb37d63d54b6
parent069a4ca2412fc8b59bd9e5cd06d30d246eb3ab4f
apparmor: fix memory leak when deduping profile load

AppArmor is leaking the newly loaded profile and its proxy when
the profile is an exact match to the currently loaded version.

In this case the dedup check results in the profile being skipped and
put without dealing with the proxy ref thus not breaking a circular
refcount and causing a leak.

BugLink: http://bugs.launchpad.net/bugs/1750594
Fixes: d1bc8f7bc400 ("apparmor: move to per loaddata files, instead of replicating in profiles")
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/policy.c