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.
K3s brings its own embedded userland runtime and dumps it on disk under
/var/lib/rancher/k3s/data/${content_id=-"current"}/ which includes runc,
containerd, and the containerd shims. The initial k3s policy implementation
re-used existing policy types from container-selinux and marked all of
the disgorged userland (binaries and config, alike) as
container_runtime_exec_t which is what runc and the containerd bits
require. Because we ship busybox in this userland, with the shell
applet, this can lead to elevated privileges for any unconfined seuser
(the default for unmodified installations).
To address this problem we have re-written the k3s-selinux policy to
declare and leverage a couple of custom types for the various bits of
"content" that k3s brings. As such, the k3s-specific file-contexts that
were pushed upstream to here with #140 and
recently modified with #156 are no longer
appropriate to be maintained here. This PR removes the k3s-specific
file-context entries for:
Signed-off-by: Jacob Blain Christen jacob@rancher.com