Disable Control Group Config (cgconfig)
An XCCDF Rule
Description
Control groups allow an administrator to allocate system resources (such as CPU,
memory, network bandwidth, etc) among a defined group (or groups) of processes executing on
a system. The cgconfig
daemon starts at boot and establishes the predefined control groups.
The cgconfig
service can be disabled with the following command:
$ sudo systemctl mask --now cgconfig.service
Rationale
Unless control groups are used to manage system resources, running the cgconfig service is not necessary.
- ID
- xccdf_org.ssgproject.content_rule_service_cgconfig_disabled
- Severity
- Low
- References
- Updated
Remediation - Kubernetes Patch
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
spec:
config:
ignition:
version: 3.1.0
Remediation - OS Build Blueprint
[customizations.services]
disabled = ["cgconfig"]
Remediation - Puppet
include disable_cgconfig
class disable_cgconfig {
service {'cgconfig':
enable => false,
ensure => 'stopped',
Remediation - Ansible
- name: Block Disable service cgconfig
block:
- name: Disable service cgconfig
block:
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" stop 'cgconfig.service'
"$SYSTEMCTL_EXEC" disable 'cgconfig.service'