Apparmor engine#14907
Closed
stefanberger wants to merge 2 commits intomoby:masterfrom
Closed
Conversation
Get rid of a ptrace related denial related to the /usr/bin/docker profile. type=AVC msg=audit(1437667226.242:410): apparmor="DENIED" operation="ptrace" profile="/usr/bin/docker" pid=19509 comm="docker" requested_mask="trace" denied_mask="trace" peer="docker-default" Signed-off-by: Stefan Berger <[email protected]>
Member
|
ping @ewindisch |
4db8e79 to
017b018
Compare
Contributor
|
I've taken a look at this and have found that our usage of 'ps' does not depend on the ptrace functionality and ps itself does not fail should it be unable to ptrace. As a result, I propose instead specifying a 'deny ptrace' which will squash the audit messages without granting this privilege. |
017b018 to
6a1c314
Compare
On Ubuntu 14.04.2 I encountered the following denials related to the 'ps' tool when running 'docker top'. The 'ps' tool does not depend on ptrace to work, so we can deny it. ype=AVC msg=audit(1437667604.333:798): apparmor="DENIED" operation="ptrace" profile="/usr/bin/docker" pid=26246 comm="ps" requested_mask="trace" denied_mask="trace" peer="unconfined" type=AVC msg=audit(1437667604.333:797): apparmor="DENIED" operation="ptrace" profile="/usr/bin/docker" pid=26246 comm="ps" requested_mask="read" denied_mask="read" peer="docker-default" type=AVC msg=audit(1437667826.332:829): apparmor="DENIED" operation="ptrace" profile="/usr/bin/docker" pid=29352 comm="ps" requested_mask="tracedby" denied_mask="tracedby" peer="/usr/bin/docker///bin/ps" Signed-off-by: Stefan Berger <[email protected]>
6a1c314 to
c13f711
Compare
Contributor
Author
|
@ewindisch I updated the 2nd patch; yes, the ps tool does not depend on ptrace for correct functioning as it seems, so I modified the patch to deny it now following your suggestion; I needed to deny it in both places, the /usr/bin/docker as well as the subprofile /bin/ps to have the log silenced. |
Contributor
|
The 'file' permission is a bit too broad for 'ps'. Perhaps you could test my branch and make PRs there? |
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.
The following two patches fix ptrace and /bin/ps related apparmor denials. Presumably none of the performed actions are malicious and therefore can be allowed by the profile.