kubernetes-csi / external-resizer

Sidecar container that watches Kubernetes PersistentVolumeClaims objects and triggers controller side expansion operation against a CSI endpoint
Apache License 2.0
120 stars 122 forks source link

Fix CVE-2023-44487 #340

Closed dannawang0221 closed 9 months ago

dannawang0221 commented 9 months ago

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind bug

What this PR does / why we need it: Fix CVE-2023-44487 Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

CVE fixes: CVE-2023-44487
k8s-ci-robot commented 9 months ago

Welcome @dannawang0221!

It looks like this is your first PR to kubernetes-csi/external-resizer 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-csi/external-resizer has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot commented 9 months ago

Hi @dannawang0221. Thanks for your PR.

I'm waiting for a kubernetes-csi 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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
dannawang0221 commented 9 months ago

/assign @sunnylovestiramisu

msau42 commented 9 months ago

/ok-to-test

msau42 commented 9 months ago

/lgtm /approve

k8s-ci-robot commented 9 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dannawang0221, msau42

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: - ~~[OWNERS](https://github.com/kubernetes-csi/external-resizer/blob/master/OWNERS)~~ [msau42] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
tyuchn commented 9 months ago

/cherry-pick release-1.8

k8s-infra-cherrypick-robot commented 9 months ago

@tyuchn: only kubernetes-csi org members may request cherry picks. You can still do the cherry-pick manually.

In response to [this](https://github.com/kubernetes-csi/external-resizer/pull/340#issuecomment-1767199746): >/cherry-pick release-1.8 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
dannawang0221 commented 9 months ago

@sunnylovestiramisu can you help cherry pick this PR to release-1.8

gnufied commented 9 months ago

/cherry-pick release-1.8

k8s-infra-cherrypick-robot commented 9 months ago

@gnufied: #340 failed to apply on top of branch "release-1.8":

Applying: Fix CVE-2023-44487
Using index info to reconstruct a base tree...
M   go.mod
M   go.sum
M   vendor/golang.org/x/net/http2/server.go
M   vendor/golang.org/x/net/http2/transport.go
M   vendor/golang.org/x/sys/unix/mkerrors.sh
A   vendor/golang.org/x/sys/unix/mremap.go
M   vendor/golang.org/x/sys/unix/syscall_aix.go
M   vendor/golang.org/x/sys/unix/syscall_darwin.go
M   vendor/golang.org/x/sys/unix/syscall_dragonfly.go
M   vendor/golang.org/x/sys/unix/syscall_freebsd.go
M   vendor/golang.org/x/sys/unix/syscall_linux.go
M   vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
M   vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
M   vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
M   vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
M   vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
M   vendor/golang.org/x/sys/unix/syscall_netbsd.go
M   vendor/golang.org/x/sys/unix/syscall_openbsd.go
M   vendor/golang.org/x/sys/unix/syscall_solaris.go
M   vendor/golang.org/x/sys/unix/syscall_unix.go
M   vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
M   vendor/golang.org/x/sys/unix/zerrors_linux.go
M   vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
M   vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
M   vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
M   vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
M   vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
M   vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
M   vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
M   vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
M   vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
M   vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
M   vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
M   vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
M   vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
M   vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go
M   vendor/golang.org/x/sys/unix/zsyscall_linux.go
M   vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
M   vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
M   vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
M   vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
M   vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
M   vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
M   vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
M   vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
M   vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
M   vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
M   vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
M   vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
M   vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
M   vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
M   vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
M   vendor/golang.org/x/sys/unix/ztypes_linux.go
M   vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
M   vendor/golang.org/x/sys/windows/exec_windows.go
M   vendor/golang.org/x/sys/windows/syscall_windows.go
M   vendor/golang.org/x/sys/windows/types_windows.go
M   vendor/golang.org/x/sys/windows/zsyscall_windows.go
M   vendor/modules.txt
Falling back to patching base and 3-way merge...
Auto-merging vendor/modules.txt
CONFLICT (content): Merge conflict in vendor/modules.txt
Auto-merging vendor/golang.org/x/sys/windows/zsyscall_windows.go
Auto-merging vendor/golang.org/x/sys/windows/types_windows.go
Auto-merging vendor/golang.org/x/sys/windows/syscall_windows.go
Auto-merging vendor/golang.org/x/sys/windows/exec_windows.go
CONFLICT (content): Merge conflict in vendor/golang.org/x/sys/windows/exec_windows.go
Auto-merging vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
Auto-merging vendor/golang.org/x/sys/unix/ztypes_linux.go
CONFLICT (content): Merge conflict in vendor/golang.org/x/sys/unix/ztypes_linux.go
Auto-merging vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_linux.go
CONFLICT (content): Merge conflict in vendor/golang.org/x/sys/unix/zsyscall_linux.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
Auto-merging vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
Auto-merging vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
Auto-merging vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
Auto-merging vendor/golang.org/x/sys/unix/zerrors_linux.go
Auto-merging vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
Auto-merging vendor/golang.org/x/sys/unix/syscall_unix.go
Auto-merging vendor/golang.org/x/sys/unix/syscall_solaris.go
Auto-merging vendor/golang.org/x/sys/unix/syscall_openbsd.go
CONFLICT (content): Merge conflict in vendor/golang.org/x/sys/unix/syscall_openbsd.go
Auto-merging vendor/golang.org/x/sys/unix/syscall_netbsd.go
CONFLICT (content): Merge conflict in vendor/golang.org/x/sys/unix/syscall_netbsd.go
Auto-merging vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
Auto-merging vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
Auto-merging vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
Auto-merging vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
Auto-merging vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
Auto-merging vendor/golang.org/x/sys/unix/syscall_linux.go
CONFLICT (content): Merge conflict in vendor/golang.org/x/sys/unix/syscall_linux.go
Auto-merging vendor/golang.org/x/sys/unix/syscall_freebsd.go
Auto-merging vendor/golang.org/x/sys/unix/syscall_dragonfly.go
Auto-merging vendor/golang.org/x/sys/unix/syscall_darwin.go
CONFLICT (content): Merge conflict in vendor/golang.org/x/sys/unix/syscall_darwin.go
Auto-merging vendor/golang.org/x/sys/unix/syscall_aix.go
CONFLICT (modify/delete): vendor/golang.org/x/sys/unix/mremap.go deleted in HEAD and modified in Fix CVE-2023-44487. Version Fix CVE-2023-44487 of vendor/golang.org/x/sys/unix/mremap.go left in tree.
Auto-merging vendor/golang.org/x/sys/unix/mkerrors.sh
Removing vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go
Auto-merging vendor/golang.org/x/net/http2/transport.go
Auto-merging vendor/golang.org/x/net/http2/server.go
Removing vendor/golang.org/x/net/http2/Makefile
Removing vendor/golang.org/x/net/http2/Dockerfile
Auto-merging go.sum
CONFLICT (content): Merge conflict in go.sum
Auto-merging go.mod
CONFLICT (content): Merge conflict in go.mod
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix CVE-2023-44487
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
In response to [this](https://github.com/kubernetes-csi/external-resizer/pull/340#issuecomment-1767203303): >/cherry-pick release-1.8 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
sunnylovestiramisu commented 9 months ago

/cherry-pick release-1.9

k8s-infra-cherrypick-robot commented 9 months ago

@sunnylovestiramisu: #340 failed to apply on top of branch "release-1.9":

Applying: Fix CVE-2023-44487
Using index info to reconstruct a base tree...
M   go.mod
M   go.sum
M   vendor/modules.txt
Falling back to patching base and 3-way merge...
Auto-merging vendor/modules.txt
CONFLICT (content): Merge conflict in vendor/modules.txt
Removing vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go
Removing vendor/golang.org/x/net/http2/Makefile
Removing vendor/golang.org/x/net/http2/Dockerfile
Auto-merging go.sum
CONFLICT (content): Merge conflict in go.sum
Auto-merging go.mod
CONFLICT (content): Merge conflict in go.mod
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix CVE-2023-44487
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
In response to [this](https://github.com/kubernetes-csi/external-resizer/pull/340#issuecomment-1767369324): >/cherry-pick release-1.9 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.