Skip to content

Comments

CNF-21196: RAN Hardening (Sysctl) - High Severity#528

Closed
sebrandon1 wants to merge 1 commit intoopenshift-kni:mainfrom
sebrandon1:sysctl-hardening-high
Closed

CNF-21196: RAN Hardening (Sysctl) - High Severity#528
sebrandon1 wants to merge 1 commit intoopenshift-kni:mainfrom
sebrandon1:sysctl-hardening-high

Conversation

@sebrandon1
Copy link
Contributor

Summary

We'll have a single MachineConfig per path, per severity. Future high level severity flags will be added to this file and rebuilt with new comment and source key/values.

Kernel hardening via sysctl:

  • Added 75-sysctl-high.yaml to apply top 5 kernel hardening sysctl flags for worker nodes

Sysctl Settings Applied

Setting Value Description
kernel.dmesg_restrict 1 Restrict kernel log access to privileged users
kernel.randomize_va_space 2 Full ASLR - randomizes memory layout to prevent exploitation
kernel.unprivileged_bpf_disabled 1 Prevent BPF-based privilege escalation
kernel.yama.ptrace_scope 1 Restrict ptrace to parent-child processes
net.core.bpf_jit_harden 2 Harden BPF JIT against spraying attacks

Test Plan

  • Apply MachineConfig to test cluster
  • Verify nodes reboot successfully
  • Check sysctl -a | grep -E 'dmesg_restrict|randomize_va_space|unprivileged_bpf|ptrace_scope|bpf_jit' shows expected values
  • Monitor for any boot failures or performance issues

Related

Add 75-sysctl-high.yaml MachineConfig to apply top 5 kernel
hardening sysctl flags for worker nodes:

- kernel.dmesg_restrict=1 - Restrict kernel log access
- kernel.randomize_va_space=2 - Full ASLR enabled
- kernel.unprivileged_bpf_disabled=1 - Disable unprivileged BPF
- kernel.yama.ptrace_scope=1 - Restrict ptrace scope
- net.core.bpf_jit_harden=2 - Harden BPF JIT compiler

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@openshift-ci-robot
Copy link
Collaborator

@sebrandon1: This pull request references CNF-21196 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 "4.22.0" version, but no target version was set.

Details

In response to this:

Summary

We'll have a single MachineConfig per path, per severity. Future high level severity flags will be added to this file and rebuilt with new comment and source key/values.

Kernel hardening via sysctl:

  • Added 75-sysctl-high.yaml to apply top 5 kernel hardening sysctl flags for worker nodes

Sysctl Settings Applied

Setting Value Description
kernel.dmesg_restrict 1 Restrict kernel log access to privileged users
kernel.randomize_va_space 2 Full ASLR - randomizes memory layout to prevent exploitation
kernel.unprivileged_bpf_disabled 1 Prevent BPF-based privilege escalation
kernel.yama.ptrace_scope 1 Restrict ptrace to parent-child processes
net.core.bpf_jit_harden 2 Harden BPF JIT against spraying attacks

Test Plan

  • Apply MachineConfig to test cluster
  • Verify nodes reboot successfully
  • Check sysctl -a | grep -E 'dmesg_restrict|randomize_va_space|unprivileged_bpf|ptrace_scope|bpf_jit' shows expected values
  • Monitor for any boot failures or performance issues

Related

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.

@openshift-ci openshift-ci bot requested review from fedepaol and ffromani January 14, 2026 13:37
@openshift-ci
Copy link

openshift-ci bot commented Jan 14, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sebrandon1
Once this PR has been reviewed and has the lgtm label, please assign irinamihai for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sebrandon1 sebrandon1 closed this Jan 14, 2026
@sebrandon1
Copy link
Contributor Author

Closing this PR - the sysctl settings here are actually MEDIUM/LOW severity per the Compliance Operator, not HIGH severity as originally labeled.

We are currently focusing on HIGH severity remediations only. HIGH severity items are tracked in PR #529 (CNF-21212).

These sysctl settings may be revisited in a future PR when we address MEDIUM severity items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants