STIGUI
V-260940CAT II — Medium severitySV-260940r966177_rule

Use of privileged Linux containers must be limited to system containers.

Rule version CNTR-MK-001220 · STIG v2 · 2024-08-27

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

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

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]

Identifiers

Group ID
V-260940
Group title
SRG-APP-000342-CTR-000775
Rule ID
SV-260940r966177_rule
Check ID
C-64669r966175_chk
Fix ID
F-64577r966176_fix