expand file and process restrictions in the SELinux policy #1464
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.
Issue number:
N/A
Description of changes:
Since host container user data can be used to pass secrets, we should block reads as well as writes to this content. Similarly, because the user data is saved in the datastore, we should also restrict access to those files.
This prevents most processes from sending signals to processes in a different domain, which could trigger unexpected system behavior.
Testing done:
Ran an unprivileged container:
Verified that I could not kill a system daemon:
Verified that I could not read host container files:
Verified that I could not read datastore files:
Launched aws-k8s-1.19 aarch64 nodes; sonobuoy run passed.
Launched aws-k8s-1.19 x86_64 nodes; verified that CloudWatch Agent and Fluent Bit could collect logs and post to CloudWatch.
Launched aws-ecs-1 aarch64 node; verified that an ECS task could run and complete.
No AVC denials were logged in these scenarios.
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.