]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
UBUNTU: SAUCE: apparmor: fix nnp subset check failure when, stacking
authorJohn Johansen <john.johansen@canonical.com>
Mon, 5 Aug 2019 23:39:50 +0000 (16:39 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitd9b32413d82a7b257a9226106d010044ec803004
treeffea3e935b2ecac5851460f061acb774d89e6a4e
parentf39d8b44ce986c6ebc39f7fd5121c524855af260
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 9fcf78cca1986 ("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: John Johansen <john.johansen@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
security/apparmor/domain.c