5.2 Ensure that, if applicable, SELinux security options are set

Information

SELinux is an effective and easy-to-use Linux application security system. It is available by default on some distributions such as Red Hat and Fedora.

Rationale:

SELinux provides a Mandatory Access Control (MAC) system that greatly augments the default Discretionary Access Control (DAC) model. You can therefore add an extra layer of safety to your containers by enabling SELinux on your Linux host.

Solution

If SELinux is applicable for your Linux OS, you should use it.

Set the SELinux State.

Set the SELinux Policy.

Create or import a SELinux policy template for Docker containers.

Start Docker in daemon mode with SELinux enabled. For example:

docker daemon --selinux-enabled

Start your Docker container using the security options. For example,

docker run --interactive --tty --security-opt label=level:TopSecret centos /bin/bash

Impact:

Any restrictions defined in the SELinux policy will be applied to your containers. It should be noted that if your SELinux policy is misconfigured, this may have an impact on the correct operation of the affected containers.

Default Value:

By default, no SELinux security options are applied on containers.

See Also

https://workbench.cisecurity.org/files/2433

Item Details

Category: SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|SC-39, CSCv6|14.4, CSCv7|14.6

Plugin: Unix

Control ID: 0b5cd9269baa2e06130fbd6b0de2d524b9e78fea7f200fc9886a0bd0c210e16a