HIGH RHCOS (Node) H2: PAM Empty Passwords P1

Verified Compare Branch Scanned: 2026-07-01
FAIL on vanilla RHCOS 9.8. Remediation tested and works. Branch pending.

Overview

This remediation disables the nullok option in PAM (Pluggable Authentication Modules) configuration, preventing authentication with empty passwords.

Settings

Setting Description
no-empty-passwords Disable nullok in PAM system-auth and password-auth

Implementation

The remediation applies a MachineConfig that modifies PAM configuration files to remove the nullok option:

apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  name: 75-pam-auth-high
  labels:
    machineconfiguration.openshift.io/role: master
spec:
  config:
    ignition:
      version: 3.2.0
    storage:
      files:
        - path: /etc/pam.d/system-auth
          mode: 0644
          overwrite: true
          contents:
            source: data:text/plain;charset=utf-8;base64,...
        - path: /etc/pam.d/password-auth
          mode: 0644
          overwrite: true
          contents:
            source: data:text/plain;charset=utf-8;base64,...

The PAM files are configured to require proper authentication without allowing empty passwords.

Compliance Checks Remediated

This group addresses the following compliance checks:

Check Profile Description Docs
rhcos4-e8-worker-no-empty-passwords E8 Prevent empty password authentication (worker) 📖
rhcos4-e8-master-no-empty-passwords E8 Prevent empty password authentication (master) 📖

Source Remediation Files

  • high/rhcos4-e8-worker-no-empty-passwords.yaml
  • high/rhcos4-e8-master-no-empty-passwords.yaml

Verification

After applying the MachineConfig, verify PAM configuration on a node:

oc debug node/<node-name> -- chroot /host grep nullok /etc/pam.d/system-auth /etc/pam.d/password-auth
# Expected: No output (nullok should not be present)

Security Impact

Disabling empty passwords ensures that:

  • All user accounts must have a password set
  • SSH and console logins require proper authentication
  • Compliance with CIS and Essential Eight security benchmarks

Upstream Proposal

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

Fix no_empty_passwords remediation for RHCOS 9 All OCP Low
ComplianceAsCode/content Upstream remediation fix (PR #14602)
Compliance operator's own remediation uses broken authselect path on RHCOS 9. Upstream fix uses direct sed instead.
Scope: Empty passwords should never be allowed on any OCP node. This is a security bug, not a hardening choice.
Remove nullok from PAM in RHCOS base image All OCP Low
coreos/rhel-coreos-config packages-openshift.yaml (authselect without-nullok postprocess) View Proposed Change
RHCOS ships with nullok in PAM, allowing empty password login. Should be removed in the base image so remediation is unnecessary.
Scope: Empty passwords should never be allowed on any OCP node. This is a security bug, not a hardening choice.

PR History

Fix no_empty_passwords remediation for RHCOS 9 Open
Remove nullok from PAM in RHCOS base image Closed redirected
Maintainer (@travier) directed change to base layer (coreos/rhel-coreos-config) instead of openshift/os. OS-level config belongs in the base image.
Remove nullok from PAM in RHCOS base image Open
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