CNF-25994: Blacklist unused filesystem kernel modules - #289
Conversation
|
@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 |
|
Hi @sebrandon1. Thanks for your PR. I'm waiting for a coreos member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
@jlebon This is a fresh PR replacing #288 (which had broken branch history after a force-push). Same content with your review feedback addressed:
|
Retire release-tied hardening epics (CNF-22573, CNF-23530, CNF-25781) and clear all associated Jira story and telco-reference PR references from tracking data. Going forward, Jiras are only created for groups with active upstream PRs. tracking-5_0.json: - Set epic to CNF-26078 (Telco Upstream Hardening) - H2: link CNF-22661 (ComplianceAsCode/content#14602) - M21: link CNF-25994 (coreos/rhel-coreos-config#289) - Clear telco-reference PRs from M5, M9, M10 - Clear closed CNF-21196 from M2 tracking.json, tracking-4_22.json, tracking-4_21.json: - Clear all Jira and PR references (all stories closed) - Preserve status, upstream research, and verdict data
|
Related to coreos/fedora-coreos-tracker#2152. We should maybe do that upstream first? |
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. Disabling them is a CIS Benchmark RHEL 9 v2.0.0 Level 1 Server requirement (Section 1.1.1). Uses the `install <module> /bin/true` pattern (same as the existing nouveau blacklist in overlay.d/02fcos-nouveau) to prevent loading entirely rather than just blacklisting from autoload. Excluded from this list: - squashfs: actively used by CoreOS for live PXE rootfs - udf: used by Azure/Hyper-V Ignition for provisioning config - usb-storage: needed for BMC virtual media and bare-metal provisioning Assisted-by: Claude (Anthropic)
769a0f5 to
d941c7b
Compare
|
I think my stance on this is that Today we have:
Over time IMO we should be trying to minimize what's in The logic goes like this:
Now, there could be exceptions. For example if RHEL won't accept a change and for some reason implementing it at the Related to @travier's comment:
I kind of feel the same way upstream as I do downstream (i.e. my comment above) even though things are slightly different. I still argue if we want these "security hardening" features we should implement them in Fedora either for all of Fedora OR for a subset of Fedora where a generalization can be made (like "definitely don't need this kernel module on Server use cases"). |
|
Interesting! Good to know the flow/hierarchy of things. I'm willing to try whatever. I can try opening up this PR in |
|
Opened the equivalent PR at the OCP node layer per @dustymabe's guidance: openshift/os#1951 |
|
Closing in favor of: openshift/os#1951 |
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).
What is excluded
Precedent and evidence
Existing RHCOS module blacklisting:
modprobe.ddrop-in pattern to prevent loading an unnecessary module (BZ#1700056)Red Hat internal adoption:
Active CVEs in these modules:
Kernel module blacklisting on OCP in production:
module_blackliston OCP SNOIndustry security guidance:
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.
References
Assisted by: Claude (Anthropic)