Disable Kernel iwlwifi Module
An XCCDF Rule
Description
To configure the system to prevent the iwlwifi
kernel module from being loaded, add the following line to the file /etc/modprobe.d/iwlwifi.conf
:
install iwlwifi /bin/trueTo configure the system to prevent the
iwlwifi
from being used,
add the following line to file /etc/modprobe.d/iwlwifi.conf
:
blacklist iwlwifi
Rationale
If Wireless functionality must be disabled, preventing the kernel from loading the kernel module provides an additional safeguard against its activation.
- ID
- xccdf_org.ssgproject.content_rule_kernel_module_iwlwifi_disabled
- Severity
- Medium
- Updated
Remediation - Kubernetes Patch
---
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
spec:
config:
ignition:
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
if LC_ALL=C grep -q -m 1 "^install iwlwifi" /etc/modprobe.d/iwlwifi.conf ; then
sed -i 's#^install iwlwifi.*#install iwlwifi /bin/true#g' /etc/modprobe.d/iwlwifi.conf
Remediation - Ansible
- name: Ensure kernel module 'iwlwifi' is disabled
lineinfile:
create: true
dest: /etc/modprobe.d/iwlwifi.conf
regexp: install\s+iwlwifi
line: install iwlwifi /bin/false