Repository navigation
feat: stack AppArmor profiles when NoNewPrivs is set - #405
Draft
olivercalder wants to merge 1 commit into
Draft
olivercalder wants to merge 1 commit into
olivercalder wants to merge 1 commit into
Conversation
When `NoNewPrivs` is set, AppArmor prevents programs from transitioning from one profile to another. This is something that the `docker` snap relies upon, as it transitions from the `snap.docker.dockerd` profile to the `docker-default` profile when it starts up a container. Thus, the `docker` snap has been broken when `NoNewPrivs` is set. This commit aims to remedy this. Instead of transitioning directly to the new profile, stack the new profile on top of the existing profile by prepending a `&` character to the profile name when `NoNewPrivileges` is set. This requires a new patch to `moby`. The existing profile transition behavior is preserved when `NoNewPrivileges` is not set. The `docker-support` interface requires changes to support profile stacking which will only be included in snapd 2.79 and later. Thus, bump the `assumes` version for snapd to 2.79. Regenerate the full patch series, as a new patch was added. Signed-off-by: Oliver Calder <oliver.calder@canonical.com>
Member
Author
|
CC @zyga |
5 of 6 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This requires the following change to land in snapd first: canonical/snapd#17730
When
NoNewPrivsis set, AppArmor prevents programs from transitioning from one profile to another. This is something that thedockersnap relies upon, as it transitions from thesnap.docker.dockerdprofile to thedocker-defaultprofile when it starts up a container. Thus, thedockersnap has been broken whenNoNewPrivsis set.This commit aims to remedy this. Instead of transitioning directly to the new profile, stack the new profile on top of the existing profile by prepending a
&character to the profile name whenNoNewPrivilegesis set. This requires a new patch tomoby.The existing profile transition behavior is preserved when
NoNewPrivilegesis not set.The
docker-supportinterface requires changes to support profile stacking which will only be included in snapd 2.79 and later. Thus, bump theassumesversion for snapd to 2.79.Regenerate the full patch series, as a new patch was added.
This is tracked internally by https://warthogs.atlassian.net/browse/SNAPDENG-37815