Skip to content

[release-4.16] OCPBUGS-99890: Cherry-pick CVE-2026-66138 fix (NTP command injection) - #200

Open
mariocr73 wants to merge 2 commits into
openshift:release-4.16from
mariocr73:OCPBUGS-99890-416
Open

[release-4.16] OCPBUGS-99890: Cherry-pick CVE-2026-66138 fix (NTP command injection)#200
mariocr73 wants to merge 2 commits into
openshift:release-4.16from
mariocr73:OCPBUGS-99890-416

Conversation

@mariocr73

@mariocr73 mariocr73 commented Jul 30, 2026

Copy link
Copy Markdown

Cherry-pick of upstream commit d4926bf onto the OCP 4.16 branch.

Fixes a command injection vulnerability in sync_clock() where an unsanitized ntp_server value could be used to execute arbitrary shell commands (CVE-2026-66138).

Upstream fix: https://review.opendev.org/c/openstack/ironic-python-agent/+/998486

Related: OCPBUGS-99890

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 30, 2026
@openshift-ci-robot

Copy link
Copy Markdown

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

  • expected dependent Jira Issue OCPBUGS-99886 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

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-pick of upstream commit d4926bf onto the OCP 4.16 branch.

Fixes a command injection vulnerability in sync_clock() where an unsanitized ntp_server value could be used to execute arbitrary shell commands (CVE-2026-66138).

Upstream fix: https://review.opendev.org/c/openstack/ironic-python-agent/+/998486

Related: OCPBUGS-99890

Made with Cursor

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 iurygregory and zaneb July 30, 2026 16:35
@openshift-ci

openshift-ci Bot commented Jul 30, 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 derekhiggins 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

The CVE-2026-66138 fix (d4926bf) calls ipaddress.ip_address() and shlex.quote() in the new _validate_ntp_server(), assuming both modules are already imported -- true on release-4.19+ (which carry an unrelated is_link_local feature that imports them) but not on this branch. Add the two missing imports so the cherry-picked fix actually runs; without them ci/prow/unit fails with NameError: name 'ipaddress' is not defined.

Related: OCPBUGS-99890
@mariocr73

Copy link
Copy Markdown
Author

/retest-required

@mariocr73 mariocr73 changed the title OCPBUGS-99890: security: fix NTP command handling [release-4.16] OCPBUGS-99890: Cherry-pick CVE-2026-66138 fix (NTP command injection) Jul 30, 2026
@mariocr73

Copy link
Copy Markdown
Author

/retest

@jkaurredhat

Copy link
Copy Markdown

/lgtm
/label approved

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 20, 2026
@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 20, 2026
@mariocr73

Copy link
Copy Markdown
Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 1, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@mariocr73: This pull request references Jira Issue OCPBUGS-99890, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.z) matches configured target version for branch (4.16.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note type set to "Release Note Not Required"
  • dependent bug Jira Issue OCPBUGS-99886 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-99886 targets the "4.17.z" version, which is one of the valid target versions: 4.17.0, 4.17.z
  • bug has dependents

No GitHub users were found matching the public email listed for the QA contact in Jira (ocp-sustaining-admins@redhat.com), skipping review request.

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.

@mariocr73

Copy link
Copy Markdown
Author

/test unit
/test pep8

@openshift-merge-bot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 25670b0 and 2 for PR HEAD 2ce2ec3 in total

@mariocr73

Copy link
Copy Markdown
Author

/retest

1 similar comment
@mariocr73

Copy link
Copy Markdown
Author

/retest

@openshift-ci

openshift-ci Bot commented Sep 4, 2026

Copy link
Copy Markdown

@mariocr73: 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/unit 2ce2ec3 link true /test unit
ci/prow/pep8 2ce2ec3 link true /test pep8

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.

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. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid 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.

4 participants