Default cgroup usage has been confirmed

docker

Classification:

compliance

Framework:

cis-docker

Control:

2.9

Set up the docker integration.

Description

The --cgroup-parent option allows you to set the default cgroup parent to use for all containers. If there is no specific usage requirement for this, the setting should be left at its default.

Rationale

System administrators typically define cgroups under which containers are supposed to run. Even if cgroups are not explicitly defined by the system administrators, containers run under docker cgroup by default. It is possible to attach to a different cgroup other than the one which is the default, however this type of usage should be monitored and confirmed because attaching to a different cgroup other than the one that is a default, it could be possible to share resources unevenly causing resource utilization problems on the host.

Audit

Review the dockerd startup options and settings in /etc/docker/daemon.json file to look for non-default cgroup use. To review the dockerd startup options, run:

ps -ef | grep dockerd 

Ensure that the --cgroup-parent parameter is either not set or is set to an appropriate non-default cgroup.

Also review the /etc/docker/daemon.json file for the cgroup-parent setting.

Remediation

The default setting is in line with good security practice and can be left in situ. If you wish to specifically set a non-default cgroup, pass the --cgroup-parent parameter to the Docker daemon when starting it.

For example, dockerd --cgroup-parent=/foobar

Impact

None.

Default value

By default, Docker daemon uses /docker for fs cgroup driver and system.slice for systemd cgroup driver.

References

  1. https://docs.docker.com/engine/reference/commandline/dockerd/#default-cgroup-parent

CIS controls

Version 6

18 Application Software Security Application Software Security