Skip to main content

More Info:

Verifies that Container Network Interface configuration files are owned by root:root so only privileged users can modify pod networking configuration.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, identify the CNI config directory used by kubelet (if not already known):
  2. On every control plane node, list current ownership of CNI configuration files to see which need fixing (use the directory from step 1 if different):
  3. On every control plane node, change ownership of all CNI configuration files to root:root:
  4. On every control plane node, also ensure ownership of any CNI network state files under /var/lib/cni/networks is root:root (if the directory exists):
  5. On every control plane node, verify CNI configuration files now have owner and group root:root:
  6. On every control plane node, verify CNI network state files (if present) are also owned by root:root:
kubectl cannot modify Container Network Interface file ownership because this setting is controlled by host-level filesystem permissions on each control plane node. To remediate this finding, log into every control plane node and follow the commands in the Manual Steps section to set the CNI configuration files to root:root.