Commit 52626f9c authored by John Johansen's avatar John Johansen Committed by Kamal Mostafa

UBUNTU: SAUCE: apparmor: Fix new to old label comparison for domain transitions

For the purposes of inherit we should be treating a profile/label transition
to its replacement as if the replacement is the profile/label.

So make the comparison based off of the label proxy, not the label itself.

BugLink: http://bugs.launchpad.net/bugs/1615880Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
Acked-by: default avatarTim Gardner <tim.gardner@canonical.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 98abfc74
......@@ -517,7 +517,7 @@ static struct aa_label *profile_transition(struct aa_profile *profile,
if (perms.allow & MAY_EXEC) {
/* exec permission determine how to transition */
new = x_to_label(profile, name, perms.xindex, &target, &info);
if (new == &profile->label && info) {
if (new && new->proxy == profile->label.proxy && info) {
/* hack ix fallback - improve how this is detected */
goto audit;
} else if (!new) {
......@@ -759,7 +759,7 @@ int apparmor_bprm_set_creds(struct linux_binprm *bprm)
bprm->unsafe |= AA_SECURE_X_NEEDED;
}
if (label != new) {
if (label->proxy != new->proxy) {
/* when transitioning clear unsafe personality bits */
if (DEBUG_ON) {
dbg_printk("apparmor: clearing unsafe personality "
......
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