The UTS namespace should not be shared with the host

docker

Classification:

compliance

Framework:

cis-docker

Control:

5.21

Esta página aún no está disponible en español. Estamos trabajando en su traducción.
Si tiene alguna pregunta o comentario sobre nuestro proyecto de traducción actual, ¡no dude en contactarnos!

Description

Containers should use a UTS namespace of their own.

Rationale

A container in the host UTS namespace can change the hostname and domain name of the host.

Audit

Inspect the containers:

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

Datadog passes the rule when a container’s UTS mode is other than host and fails it otherwise.

Remediation

Run the container without --uts=host.

Impact

None.

Default value

Containers have a UTS namespace of their own.

References

  1. https://docs.docker.com/engine/containers/run/#uts-settings—uts
  2. https://www.man7.org/linux/man-pages/man7/uts_namespaces.7.html