Skip to content

fix(deps): replace golang.org/x/crypto to fix CVE-2026-39830#8859

Closed
yiraeChristineKim wants to merge 1 commit into
openshift:release-4.19from
yiraeChristineKim:yikim/ACM-35720-fix-cve-2026-39830-golang-x-crypto
Closed

fix(deps): replace golang.org/x/crypto to fix CVE-2026-39830#8859
yiraeChristineKim wants to merge 1 commit into
openshift:release-4.19from
yiraeChristineKim:yikim/ACM-35720-fix-cve-2026-39830-golang-x-crypto

Conversation

@yiraeChristineKim

@yiraeChristineKim yiraeChristineKim commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes CVE-2026-39830 (GO-2026-5017) in golang.org/x/crypto/ssh by replacing the module with a patched fork via a go.mod replace directive, following the same pattern as the grpc CVE fix (see commit 3684079).

Vulnerability Details

CVE-2026-39830golang.org/x/crypto/ssh: Denial of Service via resource leak from unsolicited SSH responses.

A malicious SSH peer could send unsolicited global request responses to fill an internal buffer (globalResponses, size 1), blocking the connection's read loop. The blocked goroutine could not be released by calling Close(), resulting in a resource leak per connection.

Why a fork instead of bumping to v0.52.0?

golang.org/x/crypto v0.52.0 requires go 1.25.0. The release-4.19 builders use Go 1.23 (go-toolset:1.23.6), making a direct bump incompatible.

The fix backports upstream commit golang/crypto@4e7a7384ecbc onto v0.39.0, keeping go 1.23.0 in the fork's go.mod. No Go 1.25 language features are used.

Changes

File Change
go.mod Add replace golang.org/x/crypto => github.com/yiraeChristineKim/crypto v0.39.1-sec.2
go.sum Updated checksums (stale old-version entries removed by go mod tidy)
vendor/golang.org/x/crypto/ssh/mux.go Patched via go mod vendor from the fork
vendor/modules.txt Records the replace target

Fork: https://github.com/yiraeChristineKim/crypto/tree/sec-patch-v0.39.1
Upstream fix: golang/crypto@4e7a7384ecbc
CVE: CVE-2026-39830

Note: A PR is open at openshift-sustaining/crypto#4 to move the fork to the official openshift-sustaining/crypto org. Once merged and tagged, the replace directive can be updated from the personal fork to openshift-sustaining/crypto.

Test plan

  • ci/prow/verify passes
  • ci/prow/verify-deps passes
  • E2E tests pass

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 34b1f17a-407c-4642-b6b3-7c20a65a40a0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from enxebre and sjenning June 29, 2026 14:05
@yiraeChristineKim
yiraeChristineKim force-pushed the yikim/ACM-35720-fix-cve-2026-39830-golang-x-crypto branch 2 times, most recently from 60bb477 to cfe094f Compare July 1, 2026 01:58
@celebdor
celebdor force-pushed the yikim/ACM-35720-fix-cve-2026-39830-golang-x-crypto branch from cfe094f to 9c38afa Compare July 2, 2026 16:53
@csrwng csrwng added the area/dependency Issues or PRs related to dependency changes label Jul 2, 2026
@csrwng csrwng added approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/needs-area backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. lgtm Indicates that a PR is ready to be merged. labels Jul 2, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-techpreview
/test e2e-conformance

@openshift-ci

openshift-ci Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: yiraeChristineKim

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

@yiraeChristineKim
yiraeChristineKim force-pushed the yikim/ACM-35720-fix-cve-2026-39830-golang-x-crypto branch from 9c38afa to fbf9bd1 Compare July 2, 2026 19:53
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 2, 2026
@yiraeChristineKim
yiraeChristineKim force-pushed the yikim/ACM-35720-fix-cve-2026-39830-golang-x-crypto branch from fbf9bd1 to b7c63a7 Compare July 2, 2026 20:43
Replace golang.org/x/crypto with the patched fork
github.com/yiraeChristineKim/crypto v0.39.1-sec.2 to fix
CVE-2026-39830 (GO-2026-5017).

CVE-2026-39830: a malicious SSH peer could send unsolicited global
request responses to fill the internal globalResponses channel buffer
(size 1), causing handleGlobalPacket to block indefinitely and stall
the connection's read loop. Calling Close() could not release the
blocked goroutine, resulting in a resource leak per connection.

Fix: replace the blocking send in handleGlobalPacket with a
conditional non-blocking send gated on globalSentPending. A drain
loop in SendRequest discards any stale buffered responses before
sending a new request.

The upstream fix shipped in v0.52.0 which requires go 1.25.0,
incompatible with the release-4.19 builders (go 1.23). The fork
backports the fix onto v0.39.0 keeping go 1.23.0 in go.mod.

Fork: https://github.com/yiraeChristineKim/crypto/tree/sec-patch-v0.39.1
Upstream fix: golang/crypto@4e7a7384ecbc
Fixes: https://redhat.atlassian.net/browse/ACM-35720
CVE: CVE-2026-39830

Co-authored-by: Cursor <cursoragent@cursor.com>
@yiraeChristineKim
yiraeChristineKim force-pushed the yikim/ACM-35720-fix-cve-2026-39830-golang-x-crypto branch from b7c63a7 to 9ecb27f Compare July 2, 2026 20:45
@yiraeChristineKim yiraeChristineKim changed the title fix(deps): bump golang.org/x/crypto to v0.52.0 to fix CVE-2026-39830 fix(deps): replace golang.org/x/crypto to fix CVE-2026-39830 Jul 2, 2026
@yiraeChristineKim

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@yiraeChristineKim

Copy link
Copy Markdown
Contributor Author

/retest

@enxebre

enxebre commented Jul 3, 2026

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 3, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test e2e-aws-techpreview
/test e2e-conformance

@yiraeChristineKim

Copy link
Copy Markdown
Contributor Author

/retest

@yiraeChristineKim

Copy link
Copy Markdown
Contributor Author

/retest

@yiraeChristineKim

Copy link
Copy Markdown
Contributor Author

/test e2e-aws

@openshift-ci

openshift-ci Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

@yiraeChristineKim: 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/e2e-kubevirt-aws-ovn-reduced 9ecb27f link true /test e2e-kubevirt-aws-ovn-reduced
ci/prow/e2e-aws 9ecb27f link true /test e2e-aws
ci/prow/e2e-aws-techpreview 9ecb27f link true /test e2e-aws-techpreview
ci/prow/e2e-aks 9ecb27f link true /test e2e-aks
ci/prow/e2e-aws-upgrade-hypershift-operator 9ecb27f link true /test e2e-aws-upgrade-hypershift-operator

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. area/dependency Issues or PRs related to dependency changes backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants