Skip to content

[release-4.14] OCPBUGS-20561: machine-config-daemon: openshift: Exposure of Sensitive Data in Log Files in the Machine Configuration Daemon. [openshift-4]#5572

Closed
dkhater-redhat wants to merge 1 commit intoopenshift:release-4.14from
dkhater-redhat:redact-file-contents-4.14
Closed

[release-4.14] OCPBUGS-20561: machine-config-daemon: openshift: Exposure of Sensitive Data in Log Files in the Machine Configuration Daemon. [openshift-4]#5572
dkhater-redhat wants to merge 1 commit intoopenshift:release-4.14from
dkhater-redhat:redact-file-contents-4.14

Conversation

@dkhater-redhat
Copy link
Contributor

- What I did
Fixed a security vulnerability where MCD logs exposed sensitive file contents during config drift detection.

When checkFileContentsAndMode() detected a content mismatch, it logged the full diff using cmp.Diff(expectedContent, contents). This exposed sensitive data in pod logs, including:

  • Pull secrets (/var/lib/kubelet/config.json)
  • Kubelet certificates (/var/lib/kubelet/pki/*.pem)
  • CA certificates (/etc/kubernetes/kubelet-ca.crt)
  • SSH keys
  • Any other secrets managed by MachineConfig

- How to verify it
Admins can still identify which file has drift and manually inspect it on the node if needed, but secrets never appear in logs.

- Description for the changelog

@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jan 19, 2026
@openshift-ci-robot
Copy link
Contributor

@dkhater-redhat: This pull request references Jira Issue OCPBUGS-20561, which is invalid:

  • expected the weakness to target the "4.14.z" version, but no target version was set
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-20561 to depend on a bug targeting a version in 4.15.0, 4.15.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

- What I did
Fixed a security vulnerability where MCD logs exposed sensitive file contents during config drift detection.

When checkFileContentsAndMode() detected a content mismatch, it logged the full diff using cmp.Diff(expectedContent, contents). This exposed sensitive data in pod logs, including:

  • Pull secrets (/var/lib/kubelet/config.json)
  • Kubelet certificates (/var/lib/kubelet/pki/*.pem)
  • CA certificates (/etc/kubernetes/kubelet-ca.crt)
  • SSH keys
  • Any other secrets managed by MachineConfig

- How to verify it
Admins can still identify which file has drift and manually inspect it on the node if needed, but secrets never appear in logs.

- Description for the changelog

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 djoshy and jkyros January 19, 2026 23:22
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 19, 2026
@dkhater-redhat dkhater-redhat force-pushed the redact-file-contents-4.14 branch from 464d1db to b7e9f6f Compare January 19, 2026 23:42
@dkhater-redhat dkhater-redhat changed the title OCPBUGS-20561: machine-config-daemon: openshift: Exposure of Sensitive Data in Log Files in the Machine Configuration Daemon. [openshift-4] [release 4-14] OCPBUGS-20561: machine-config-daemon: openshift: Exposure of Sensitive Data in Log Files in the Machine Configuration Daemon. [openshift-4] Jan 19, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 20, 2026

@dkhater-redhat: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-e2e-gcp-ovn-upgrade b7e9f6f link false /test okd-scos-e2e-gcp-ovn-upgrade
ci/prow/e2e-hypershift b7e9f6f link true /test e2e-hypershift
ci/prow/okd-scos-e2e-gcp-op b7e9f6f link false /test okd-scos-e2e-gcp-op
ci/prow/okd-scos-e2e-aws-ovn b7e9f6f link false /test okd-scos-e2e-aws-ovn

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@dkhater-redhat dkhater-redhat changed the title [release 4-14] OCPBUGS-20561: machine-config-daemon: openshift: Exposure of Sensitive Data in Log Files in the Machine Configuration Daemon. [openshift-4] [release-4.14] OCPBUGS-20561: machine-config-daemon: openshift: Exposure of Sensitive Data in Log Files in the Machine Configuration Daemon. [openshift-4] Jan 20, 2026
Copy link
Member

@isabella-janssen isabella-janssen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/label backport-risk-assessed

Change seems fair.

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Jan 27, 2026
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 27, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 27, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dkhater-redhat, isabella-janssen

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

The pull request process is described 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

@dkhater-redhat
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

@dkhater-redhat: This pull request references Jira Issue OCPBUGS-20561, which is invalid:

  • expected the weakness to target the "4.14.z" version, but no target version was set
  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected Jira Issue OCPBUGS-20561 to depend on a bug targeting a version in 4.15.0, 4.15.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

/jira refresh

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.

@dkhater-redhat
Copy link
Contributor Author

turns out this is a vulnerability in all branches so im going to close this one and backport the fix to this release eventually

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.