STIGUI
V-260939CAT II — Medium severitySV-260939r966174_rule

MKE users must not have permissions to create containers or pods that share the host user namespace.

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

Discussion

To limit the attack surface of MKE, it is important that the nonessential services are not installed and access to the host system uses the concept of least privilege.

User namespaces ensure that a root process inside the container will be mapped to a nonroot process outside the container. Sharing the user namespaces of the host with the container thus does not isolate users on the host with users on the containers.

By default, the host user namespace is shared with the containers until user namespace support is enabled.

Check

When using Kubernetes orchestration, this check is Not Applicable.

When using Swarm orchestration, ensure that the PIDs cgroup limit is used.

Log in to the CLI as an MKE Admin and execute the following command using a Universal Control Plane (MKE) client bundle:

docker ps --quiet --all | xargs docker inspect --format '{{ .Id }}: UsernsMode={{ .HostConfig.UsernsMode }}'

Ensure it does not return any value for UsernsMode. If it returns a value of "host", that means the host user namespace is shared with the containers, and this is a finding.

Fix

When using Kubernetes orchestration, this check is Not Applicable.

When using Swarm orchestration, review and remove nonsystem containers previously created by these users without the runAsGroup using:

docker container rm [container]

Identifiers

Group ID
V-260939
Group title
SRG-APP-000342-CTR-000775
Rule ID
SV-260939r966174_rule
Check ID
C-64668r966172_chk
Fix ID
F-64576r966173_fix