This repository was archived by the owner on May 30, 2023. It is now read-only.
sec-policy/selinux-base-policy: add capability to unlabeled_t#1426
Merged
sec-policy/selinux-base-policy: add capability to unlabeled_t#1426
Conversation
pothos
approved these changes
Nov 18, 2021
pothos
reviewed
Nov 18, 2021
| "${FILESDIR}/init.patch" | ||
| "${FILESDIR}/locallogin.patch" | ||
| "${FILESDIR}/logging.patch" | ||
| "${FILESDIR}/unlabeled.patch" |
Contributor
There was a problem hiding this comment.
Maybe we can annotate here that this was for torcx and it could be dropped in the future
Contributor
Author
There was a problem hiding this comment.
Good idea and let's add a reference in: flatcar/Flatcar#443
with this patch, we allow `unlabeled_t` to associate to tmpfs
filesystem.
It aims to solve the AVC we have with `torcx` with the
`torcx-generator`:
```
Nov 15 09:45:43 localhost audit[688]: AVC avc: denied { associate } for pid=688 comm="torcx-generator" name="docker" dev="tmpfs" ino=2 scontext=system_u:object_r:unlabeled_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=filesystem permissive=0
```
It has been not been caught earlier because it occurs
when the system boots with `SELinux` in `enforcing` mode.
This denial was preventing torcx to finish correctly its setup and so
Docker was not able to start.
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
73623bf to
9380a02
Compare
Contributor
Author
|
cherry-picked to:
|
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
with this patch, we allow
unlabeled_tto associate to tmpfsfilesystem.
It aims to solve the AVC we have with
torcxwith thetorcx-generator:It has been not been caught earlier because it occurs
when the system boots with
SELinuxinenforcingmode.This denial was preventing torcx to finish correctly its setup and so
Docker was not able to start.
Signed-off-by: Mathieu Tortuyaux mtortuyaux@microsoft.com
It has been reported in flatcar/Flatcar#544
CI 🔵 : http://jenkins.infra.kinvolk.io:8080/job/os/job/manifest/4177/cldsv/
Tested on built image with SELinux enabled early in the boot:
While on current stable with the same config:
NOTE: Mantle logic is now implemented in order to enable
SELinuxinenforcingas soon as possible: flatcar/mantle#252