The containerd socket file should have permissions of 660 or stricter

docker

Classification:

compliance

Framework:

cis-docker

Control:

3.24

Description

The containerd socket should have mode 660 or stricter.

Rationale

Whoever can use the containerd socket controls every container of the host. Mode 660 or stricter limits its use to its owner and group.

Audit

Show the mode of /run/containerd/containerd.sock:

stat -c '%a' /run/containerd/containerd.sock

Datadog passes the rule when /run/containerd/containerd.sock has mode 660 or stricter, fails it when the mode is less strict, and reports it not applicable when the path is absent.

Remediation

Set the mode:

chmod 660 /run/containerd/containerd.sock

Impact

None.

Default value

containerd creates its socket with mode 660.