]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
apparmor: fix change_hat not finding hat after policy replacement
authorJohn Johansen <john.johansen@canonical.com>
Thu, 1 Sep 2016 04:10:06 +0000 (21:10 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 23 Feb 2017 03:54:38 +0000 (03:54 +0000)
commit31e7f933453b2d8415381b57741a2cdd1d4d5f36
tree5799b0be60ae7b44fec202298efced37ec9fdaac
parent7c3ad0d86f80618c00a5d6a267080238185038f6
apparmor: fix change_hat not finding hat after policy replacement

commit 3d40658c977769ce2138f286cf131537bf68bdfe upstream.

After a policy replacement, the task cred may be out of date and need
to be updated. However change_hat is using the stale profiles from
the out of date cred resulting in either: a stale profile being applied
or, incorrect failure when searching for a hat profile as it has been
migrated to the new parent profile.

Fixes: 01e2b670aa898a39259bc85c78e3d74820f4d3b6 (failure to find hat)
Fixes: 898127c34ec03291c86f4ff3856d79e9e18952bc (stale policy being applied)
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1000287
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
security/apparmor/domain.c