[release-4.14] OCPBUGS-99891: Cherry-pick CVE-2026-66138 fix (NTP command injection) - #202
[release-4.14] OCPBUGS-99891: Cherry-pick CVE-2026-66138 fix (NTP command injection)#202mariocr73 wants to merge 2 commits into
Conversation
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>
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-99891
|
@mariocr73: This pull request references Jira Issue OCPBUGS-99891, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mariocr73 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/retest-required |
|
/retest |
|
@mariocr73: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Cherry-pick of upstream commit d4926bf onto the OCP 4.14 branch.
Fixes a command injection vulnerability in
sync_clock()where an unsanitizedntp_servervalue could be used to execute arbitrary shell commands (CVE-2026-66138).This branch predates the
is_link_localfeature that release-4.19+ carries (which already importsipaddress/shlex), so a follow-up commit adds the two missing imports the cherry-picked fix needs -- without them,ci/prow/unitfails withNameError: name 'ipaddress' is not defined.Upstream fix: https://review.opendev.org/c/openstack/ironic-python-agent/+/998486
Related: OCPBUGS-99891