]> git.baikalelectronics.ru Git - kernel.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)
committerJames Morris <james.l.morris@oracle.com>
Mon, 21 Nov 2016 07:01:28 +0000 (18:01 +1100)
commita9185f482843fe46fe792d346914e53a1def24e7
treea4413e2582ba4d840edb2e21e030e85d679f1b67
parent27e08340dafac41fab594c436acee8ea5d8bddc7
apparmor: fix change_hat not finding hat after policy replacement

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: 6228229860a6ed35b8dfc0fc13dfa3daff01213a (failure to find hat)
Fixes: 95c652c046bf3d02e9c070ea38d8ec25a74ad262 (stale policy being applied)
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1000287
Cc: stable@vger.kernel.org
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
security/apparmor/domain.c