Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.22] Fix CVE-2022-41723 by bumping golang.org/x/net to 0.8.0 #754

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

wyike
Copy link
Contributor

@wyike wyike commented Aug 24, 2023

What this PR does / why we need it:
CVE fix CVE-2022-41723

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

Release note:

Bump golang.org/x/net to 0.8.0 for CVE fix

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 24, 2023
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 24, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @wyike. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 24, 2023
@wyike
Copy link
Contributor Author

wyike commented Aug 24, 2023

/assign @lubronzhan

@XudongLiuHarold
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 24, 2023
@lubronzhan
Copy link
Contributor

/ok-to-test

@wyike
Copy link
Contributor Author

wyike commented Aug 24, 2023

Hi @XudongLiuHarold @lubronzhan do you know why tests are not launched? Any runner issue or something?

@wyike
Copy link
Contributor Author

wyike commented Aug 24, 2023

/test ?

@k8s-ci-robot
Copy link
Contributor

@wyike: The following commands are available to trigger required jobs:

  • /test pull-cloud-provider-vsphere-verify-markdown
  • /test pull-cloud-provider-vsphere-verify-shell

In response to this:

/test ?

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/test-infra repository.

@XudongLiuHarold
Copy link
Member

/test pull-cloud-provider-vsphere-unit-test

@k8s-ci-robot
Copy link
Contributor

@XudongLiuHarold: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test pull-cloud-provider-vsphere-verify-markdown
  • /test pull-cloud-provider-vsphere-verify-shell

In response to this:

/test pull-cloud-provider-vsphere-unit-test

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/test-infra repository.

@wyike
Copy link
Contributor Author

wyike commented Aug 25, 2023

/test ?

@k8s-ci-robot
Copy link
Contributor

@wyike: The following commands are available to trigger required jobs:

  • /test pull-cloud-provider-vsphere-build-1-26-minus
  • /test pull-cloud-provider-vsphere-coverage-1-26-minus
  • /test pull-cloud-provider-vsphere-integration-test-1-26-minus
  • /test pull-cloud-provider-vsphere-unit-test-1-26-minus
  • /test pull-cloud-provider-vsphere-verify-fmt-1-26-minus
  • /test pull-cloud-provider-vsphere-verify-lint-1-26-minus
  • /test pull-cloud-provider-vsphere-verify-markdown
  • /test pull-cloud-provider-vsphere-verify-shell
  • /test pull-cloud-provider-vsphere-verify-staticcheck-1-26-minus
  • /test pull-cloud-provider-vsphere-verify-vet-1-26-minus

The following commands are available to trigger optional jobs:

  • /test pull-cloud-provider-vsphere-e2e-test-1-26-minus

Use /test all to run the following jobs that were automatically triggered:

  • pull-cloud-provider-vsphere-build-1-26-minus
  • pull-cloud-provider-vsphere-coverage-1-26-minus
  • pull-cloud-provider-vsphere-e2e-test-1-26-minus
  • pull-cloud-provider-vsphere-integration-test-1-26-minus
  • pull-cloud-provider-vsphere-unit-test-1-26-minus
  • pull-cloud-provider-vsphere-verify-staticcheck-1-26-minus

In response to this:

/test ?

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/test-infra repository.

@wyike
Copy link
Contributor Author

wyike commented Aug 25, 2023

/test all

@wyike
Copy link
Contributor Author

wyike commented Aug 25, 2023

The test image gcr.io/k8s-staging-test-infra/kubekins-e2e:v20230727-ea685f8747-1.25 is using golang 1.20

Some of UT in release-1.22, release-1.23, release-1.24 can pass with golang 1.19 (tested locally) while golang 1.20 not:

=== RUN   TestWithVerificationWithWrongThumbprint
2023/08/25 06:18:58 http: TLS handshake error from 127.0.0.1:54420: remote error: tls: bad certificate
E0825 06:18:58.354725   11774 connection.go:177] Failed to create new client. err: Post "https://127.0.0.1:34405/sdk": tls: failed to verify certificate: x509: certificate signed by unknown authority
    connection_test.go:118: Expected wrong thumbprint error, got 'Post "https://127.0.0.1:34405/sdk": tls: failed to verify certificate: x509: certificate signed by unknown authority'
--- FAIL: TestWithVerificationWithWrongThumbprint (0.07s)
=== RUN   TestWithVerificationWithoutCaCertOrThumbprint
2023/08/25 06:18:58 http: TLS handshake error from 127.0.0.1:56700: remote error: tls: bad certificate
E0825 06:18:58.370794   11774 connection.go:177] Failed to create new client. err: Post "https://127.0.0.1:39035/sdk": tls: failed to verify certificate: x509: certificate signed by unknown authority
    connection_test.go:195: Expected to receive a wrapped x509.UnknownAuthorityError, got: 'Post "https://127.0.0.1:39035/sdk": tls: failed to verify certificate: x509: certificate signed by unknown authority' (&url.Error{Op:"Post", URL:"https://127.0.0.1:39035/sdk", Err:(*tls.CertificateVerificationError)(0xc0006ca180)})
--- FAIL: TestWithVerificationWithoutCaCertOrThumbprint (0.02s)
=== RUN   TestWithValidThumbprint
E0825 06:18:58.386900   11774 connection.go:177] Failed to create new client. err: Post "https://127.0.0.1:35173/sdk": tls: failed to verify certificate: x509: certificate signed by unknown authority
    connection_test.go:211: Never saw a request, maybe TLS connection could not be established?
--- FAIL: TestWithValidThumbprint (0.02s) 

Something is changed between golang/govmomi versions. To have the UT be compatible with golang 1.20:

Also from #736,, I did believe golang1.20 is not compatible with releases with govmomi lower than 0.36 (i.e. release-1.26 ~1.22).

Hi @lubronzhan do we consider to run tests on 1.26-minus with golang 1.19 version image? Will it be more reasonable? I see for release 1.26 and earlier releases, actually the golang version for vsphere capi is not higher than 1.19.
Here is one 1.19 image I found from test infra:

docker run --entrypoint go gcr.io/k8s-staging-test-infra/kubekins-e2e:v20221107-33c989e684-1.25 version
Unable to find image 'gcr.io/k8s-staging-test-infra/kubekins-e2e:v20221107-33c989e684-1.25' locally
v20221107-33c989e684-1.25: Pulling from k8s-staging-test-infra/kubekins-e2e
b6d6a76ebdbe: Pull complete 
...
77535f84c209: Pull complete 
Digest: sha256:12dabdb0dc4d90969c7289d82767a99d04b6cc7b963b8c1044775e5856b82076
Status: Downloaded newer image for gcr.io/k8s-staging-test-infra/kubekins-e2e:v20221107-33c989e684-1.25
go version go1.19.3 linux/amd64

@lubronzhan
Copy link
Contributor

Ok, I thought [20230727-ea685f8747-1.25](http://gcr.io/k8s-staging-test-infra/kubekins-e2e:v20230727-ea685f8747-1.25) use 1.19, that's why we have a different file. Ok then please update test-infra to earlier version

@wyike
Copy link
Contributor Author

wyike commented Aug 28, 2023

/retest

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Aug 28, 2023

@wyike: 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
pull-cloud-provider-vsphere-verify-fmt-1-26-minus 82e025d link unknown /test pull-cloud-provider-vsphere-verify-fmt-1-26-minus
pull-cloud-provider-vsphere-e2e-test-1-26-minus a96ea90 link false /test pull-cloud-provider-vsphere-e2e-test-1-26-minus

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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/test-infra repository. I understand the commands that are listed here.

@wyike
Copy link
Contributor Author

wyike commented Aug 28, 2023

1.22 doesn't have e2e script setup. e2e-test is expected to fail.

@lubronzhan
Copy link
Contributor

Ok we can merge without the e2e
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 28, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lubronzhan, wyike

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 28, 2023
@k8s-ci-robot k8s-ci-robot merged commit 9a9826d into kubernetes:release-1.22 Aug 28, 2023
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants