Check: CNTR-MK-001220
Mirantis Kubernetes Engine STIG:
CNTR-MK-001220
(in version v1 r1)
Title
Use of privileged Linux containers must be limited to system containers. (Cat II impact)
Discussion
Using the --privileged flag gives all Linux Kernel Capabilities to the container, thus overwriting the --cap-add and --cap-drop flags. The --privileged flag gives all capabilities to the container, and it also lifts all the limitations enforced by the device cgroup controller. Any container that requires this privilege must be documented and approved.
Check Content
When using Kubernetes orchestration, this check is Not Applicable. When using Swarm orchestration, execute the following command as a trusted user on the host operating system via CLI: docker ps --quiet --all | grep -iv "MKE\|kube\|dtr" | awk '{print $1}' | xargs docker inspect --format '{{ .Id }}: Privileged={{ .HostConfig.Privileged }}' Verify in the output that no containers are running with the --privileged flag. If there are, this is a finding.
Fix Text
When using Kubernetes orchestration, this check is Not Applicable. Review and remove nonsystem containers previously created by these users that allowed privileged execution using: docker container rm [container]
Additional Identifiers
Rule ID: SV-260940r966177_rule
Vulnerability ID: V-260940
Group Title: SRG-APP-000342-CTR-000775
Expert Comments
CCIs
Number | Definition |
---|---|
CCI-002233 |
The information system prevents organization-defined software from executing at higher privilege levels than users executing the software. |
Controls
Number | Title |
---|---|
AC-6 (8) |
Privilege Levels For Code Execution |