MEDIUM RHCOS (Node) M6: Audit Rules - Time Modifications P2

Pending Compare Branch Scanned: 2026-08-12

Remediation required. This group (5 checks) fails on vanilla RHCOS 10.2 and requires MachineConfig remediation. Verified on cnfdt16 (OCP 5.0, RHCOS 10.2) with compliance-operator v1.8.2.

Overview

This remediation configures audit rules to monitor system time modifications, which are critical for maintaining accurate audit logs and detecting tampering.

Settings

Rule Description
adjtimex Audit fine-grained time adjustments
clock_settime Audit clock setting operations
settimeofday Audit time-of-day changes
stime Audit legacy time setting
/etc/localtime Watch for localtime file changes

Implementation

apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  name: 75-audit-time-medium
  labels:
    machineconfiguration.openshift.io/role: master
spec:
  config:
    ignition:
      version: 3.2.0
    storage:
      files:
        - path: /etc/audit/rules.d/75-time-change.rules
          mode: 0644
          overwrite: true
          contents:
            inline: |
              ## Time change monitoring
              -a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change
              -a always,exit -F arch=b32 -S adjtimex -S settimeofday -S stime -k time-change
              -a always,exit -F arch=b64 -S clock_settime -k time-change
              -a always,exit -F arch=b32 -S clock_settime -k time-change
              -w /etc/localtime -p wa -k time-change

Compliance Checks Remediated

Check Profile Docs
rhcos4-e8-worker-audit-rules-time-adjtimex E8 📖
rhcos4-e8-worker-audit-rules-time-clock-settime E8 📖
rhcos4-e8-worker-audit-rules-time-settimeofday E8 📖
rhcos4-e8-worker-audit-rules-time-stime E8 📖
rhcos4-e8-worker-audit-rules-time-watch-localtime E8 📖

Source Remediation Files (5)

  • medium/rhcos4-e8-worker-audit-rules-time-adjtimex.yaml
  • medium/rhcos4-e8-worker-audit-rules-time-clock-settime.yaml
  • medium/rhcos4-e8-worker-audit-rules-time-settimeofday.yaml
  • medium/rhcos4-e8-worker-audit-rules-time-stime.yaml
  • medium/rhcos4-e8-worker-audit-rules-time-watch-localtime.yaml

Security Impact

Time modification auditing is critical because:

  • Attackers may alter time to invalidate security certificates
  • Time changes can corrupt audit log sequencing
  • Accurate timestamps are essential for forensic analysis

Upstream Proposal

The following changes could eliminate the need for MachineConfig remediation. Items are categorized by recommended scope:

Time modification audit rules (5 syscalls) RAN Low
openshift/os /etc/audit/rules.d/50-time-change.rules
Tracks time changes that could be used to manipulate log timestamps for forensic evasion.
Scope: Time change auditing matters for forensic integrity but adds log volume on all nodes.

PR History

Time modification audit rules (5 syscalls) Not Filed blocked
Audit rules are compliance monitoring policies, not security defaults. RHCOS ships no audit rules in rules.d by default — only samples in /usr/share/audit/sample-rules/ that Red Hat explicitly warns are 'not exhaustive nor up to date.' CoreOS maintainers debated whether to include the audit RPM at all (fedora-coreos-tracker#461) and called it 'an odd fit' (coreos/bugs#140). Audit messages already flood console on fresh boot (fedora-coreos-tracker#220). Deploying rules in the base image would substantially increase audit volume for all RHCOS deployments. The Compliance Operator's MachineConfig remediation model is the intended deployment path.
Legend
Remediation Status
✅ PASS (vanilla) Passes on unhardened RHCOS; no remediation needed
🟢 Verified Remediation tested on live cluster, confirmed PASS
🔵 In Progress Remediation actively being developed or tested
🟡 Pending Not yet started; needs remediation work
🟠 Partial Some checks pass or remediation not fully validated
⚪ On Hold Work paused (blocked or deprioritized)
Upstream Verdict
🔼 Candidate Suitable for upstreaming to ComplianceAsCode
🟣 PR Open Upstream PR filed
🎯 RAN Only Only applies to RAN deployments
⚙️ Platform Requires OCP platform-level configuration
✅ Pass Already passing upstream
📍 Site Site/deployment-specific configuration
— N/A Not applicable for upstreaming
Platform
RHCOS Node-level checks (MachineConfig)
OCP Platform-level checks (API/CR)
Mixed Both RHCOS and OCP checks
Severity
HIGH
MEDIUM
LOW
MANUAL

Keyboard Shortcuts

Navigation
j / Next row
k / Previous row
Enter Open selected / Expand details
Esc Clear selection / Close modal
Actions
/ Focus search
d Toggle dark mode
? Show this help
g h Go to home
Filters
1 Show all
2 Pending only
3 In Progress only
4 Complete only