Commit e5f681e2 authored by John Johansen's avatar John Johansen Committed by Shrirang Bagul
Browse files

UBUNTU: SAUCE: apparmor: fix nnp subset check failure when, stacking

This is a backport of a fix that landed as part of a larger patch
in 4.17 commit 9fcf78cc ("apparmor: update domain transitions that are subsets of confinement at nnp")

Domain transitions that add a new profile to the confinement stack
when under NO NEW PRIVS is allowed as it can not expand privileges.

However such transitions are failing due to how/where the subset
test is being applied. Applying the test per profile in the
profile transition and profile_onexec call backs is incorrect as
it disregards the other profiles in the stack so it can not
correctly determine if the old confinement stack is a subset of
the new confinement stack.

Move the test to after the new confinement stack is constructed.

BugLink: http://bugs.launchpad.net/bugs/1839037


Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarTyler Hicks <tyhicks@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
(cherry picked from commit d9b32413)
Signed-off-by: default avatarShrirang Bagul <shrirang.bagul@canonical.com>
parent ac684c35
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment