Skip to content

[release-4.21] OCPBUGS-100051: Cherry-pick CVE-2026-66138 fix (NTP command injection) - #195

Open
mariocr73 wants to merge 1 commit into
openshift:release-4.21from
mariocr73:OCPBUGS-100051-421
Open

[release-4.21] OCPBUGS-100051: Cherry-pick CVE-2026-66138 fix (NTP command injection)#195
mariocr73 wants to merge 1 commit into
openshift:release-4.21from
mariocr73:OCPBUGS-100051-421

Conversation

@mariocr73

Copy link
Copy Markdown

Cherry-picks upstream security fix d4926bf ("security: fix NTP command handling", CVE-2026-66138) onto the OCP 4.21 branch.

The value of the ntp_server config option was passed unsanitized into a shell command (chronyd -q '<query>', shell=True) in sync_clock(), allowing arbitrary root command execution at early IPA boot. This patch adds input validation and removes shell=True in favor of shlex.quote().

Upstream: https://review.opendev.org/c/openstack/ironic-python-agent/+/998486
OSSA: https://security.openstack.org/ossa/OSSA-2026-027.html

Related: OCPBUGS-100051

Adds basic validation of the NTP server parameter to harden the
usage of the NTP server time setting *AND* also uses shlex.quote
to and removes shell=true from the execution invocation to prevent
any possibliity of injecting a malicious command to be executed.

Related-Bug: 2160050
Assisted-By: Claude Opus 4.6
Change-Id: I69e85a1c5040066674d90a6e12acc30cec96ba76
Signed-off-by: Julia Kreger <juliaashleykreger@gmail.com>
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. 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 Jul 29, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@mariocr73: This pull request references Jira Issue OCPBUGS-100051, which is invalid:

  • expected dependent Jira Issue OCPBUGS-99897 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is New instead
  • expected dependent Jira Issue OCPBUGS-99897 to target a version in 4.22.0, but it targets "4.22.z" instead

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:

Cherry-picks upstream security fix d4926bf ("security: fix NTP command handling", CVE-2026-66138) onto the OCP 4.21 branch.

The value of the ntp_server config option was passed unsanitized into a shell command (chronyd -q '<query>', shell=True) in sync_clock(), allowing arbitrary root command execution at early IPA boot. This patch adds input validation and removes shell=True in favor of shlex.quote().

Upstream: https://review.opendev.org/c/openstack/ironic-python-agent/+/998486
OSSA: https://security.openstack.org/ossa/OSSA-2026-027.html

Related: OCPBUGS-100051

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 commented Jul 29, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mariocr73
Once this PR has been reviewed and has the lgtm label, please assign iurygregory 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

@mariocr73

Copy link
Copy Markdown
Author

ℹ️ Note: openshift/ironic-agent-image#296 depends on this PR merging first (it bumps the pinned requirements.cachito commit to 295c9d27, the result of this cherry-pick).

@openshift-ci

openshift-ci Bot commented Jul 29, 2026

Copy link
Copy Markdown

@mariocr73: all tests passed!

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.

@mariocr73

Copy link
Copy Markdown
Author

/jira refresh

@openshift-ci-robot

Copy link
Copy Markdown

@mariocr73: This pull request references Jira Issue OCPBUGS-100051, which is invalid:

  • expected dependent Jira Issue OCPBUGS-99897 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is POST instead

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.

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.

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

Labels

jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants