CNF-25994: Blacklist unused filesystem kernel modules - #1951
Conversation
Add a modprobe configuration to prevent loading of 5 filesystem kernel modules that have no legitimate use on a container host OS: - cramfs (compressed ROM filesystem, embedded Linux only) - freevxfs (Veritas filesystem) - hfs (legacy Mac filesystem) - hfsplus (Mac OS Extended filesystem) - jffs2 (Journalling Flash File System v2, raw flash devices only) These modules represent unnecessary attack surface on RHCOS nodes. Disabling them is a CIS Benchmark RHEL 9 v2.0.0 Level 1 Server requirement (Section 1.1.1). Excluded modules: - squashfs: used by CoreOS live PXE rootfs - udf: used by Azure/Hyper-V Ignition for provisioning - usb-storage: needed for BMC virtual media and bare-metal provisioning Verified on OCP 4.22 (MNO, 3 master + 2 worker) and OCP 4.21 (SNO) with no functional regressions. None of these modules are loaded by default on RHCOS. Follows the same overlay file pattern used by other hardening configs in this repo (sysctl, auditd, kernel boot args). Assisted-by: Claude (Anthropic)
|
@sebrandon1: This pull request references CNF-25994 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sebrandon1 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@sebrandon1: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Jira: CNF-25994
Summary
Add a modprobe configuration to prevent loading of 5 filesystem kernel modules
that have no legitimate use on a container host OS:
cramfs— compressed ROM filesystem (embedded Linux only)freevxfs— Veritas filesystemhfs— legacy Mac filesystemhfsplus— Mac OS Extended filesystemjffs2— Journalling Flash File System v2 (raw flash devices only)These modules represent attack surface with zero functional value on RHCOS.
Disabling them is a CIS Benchmark RHEL 9 v2.0.0
Level 1 Server requirement (Section 1.1.1).
Why openshift/os
This was originally proposed in coreos/rhel-coreos-config#289.
Per reviewer feedback
from @dustymabe, this hardening is OCP-specific and belongs at the node image
layer (
openshift/os) rather than the base RHCOS layer (rhel-coreos-config).What is excluded
CVE evidence
These modules are not theoretical risk — they carry demonstrated CVE exposure:
Precedent
Existing module blacklisting in RHCOS/Fedora ecosystem:
Red Hat official endorsement:
Distribution-level precedent:
Compliance frameworks:
Customer demand:
Testing
Verified on OCP 4.22 (MNO, 3 master + 2 worker) and OCP 4.21 (SNO) that
blacklisting these 5 modules causes no functional regressions. These modules
are not loaded by default on RHCOS and have no consumers in the container
host stack. Source code audit across 16 OCP repos confirmed zero functional
dependencies.
Assisted by: Claude (Anthropic)