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

Added control for the nil request #507

Merged
merged 3 commits into from
Jul 31, 2023
Merged

Conversation

g0ku704
Copy link
Contributor

@g0ku704 g0ku704 commented Jul 13, 2023

This fix is to prevent Goproxy server crashes if the request cannot be parsed in line https://github.com/elazarl/goproxy/blob/master/https.go#L234 then logged in line https://github.com/elazarl/goproxy/blob/master/https.go#L249 when proxy is in MITM mode.

Fixes #502

https.go Outdated Show resolved Hide resolved
@g0ku704 g0ku704 requested a review from mpatlasov July 21, 2023 02:25
@mpatlasov
Copy link

/lgtm

https.go Outdated
@@ -246,7 +246,11 @@ func (proxy *ProxyHttpServer) handleHttps(w http.ResponseWriter, r *http.Request
return
}
if err != nil {
ctx.Warnf("Illegal URL %s", "https://"+r.Host+req.URL.Path)
if req != nil {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive by review: Should this be if req.URL != nil? If req is nil, then I'd expect isWebSocketRequest above to panic.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good catch. I've changed to if req.URL != nil instead.

@g0ku704 g0ku704 requested a review from neild July 30, 2023 14:19
@kostyay
Copy link

kostyay commented Jul 31, 2023

Any plans to merge this?

@g0ku704
Copy link
Contributor Author

g0ku704 commented Jul 31, 2023

Any plans to merge this?

We need a maintainer approval.

@elazarl elazarl merged commit f99041a into elazarl:master Jul 31, 2023
1 check passed
mpatlasov added a commit to mpatlasov/aws-ebs-csi-driver that referenced this pull request Aug 24, 2023
…491)

```
$ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy; go mod vendor
```

where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788
mpatlasov added a commit to mpatlasov/aws-ebs-csi-driver that referenced this pull request Aug 24, 2023
The patch to be dropped on the nearest CSI driver rebase (upstream aws-ebs CSI driver does not depend on goproxy since v1.19.0).
The PR removing goproxy deps upstream: kubernetes-sigs#1602

The content of this patch resulted from:
```
$ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy; go mod vendor
```
where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788
mpatlasov added a commit to mpatlasov/vmware-vsphere-csi-driver that referenced this pull request Aug 24, 2023
The content of this patch resulted from:
```
$ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy
```
where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788
k8s-ci-robot pushed a commit to kubernetes-sigs/vsphere-csi-driver that referenced this pull request Aug 28, 2023
The content of this patch resulted from:
```
$ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy
```
where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788
chethanv28 pushed a commit to chethanv28/vsphere-csi-driver that referenced this pull request Sep 1, 2023
…s#2511)

The content of this patch resulted from:
```
$ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy
```
where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788
k8s-ci-robot pushed a commit to kubernetes-sigs/vsphere-csi-driver that referenced this pull request Sep 1, 2023
The content of this patch resulted from:
```
$ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy
```
where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788

Co-authored-by: Maxim Patlasov <mpt@redhat.com>
mpatlasov added a commit to mpatlasov/vmware-vsphere-csi-driver that referenced this pull request Oct 19, 2023
…VE-2023-37788

> The content of this patch resulted from:
```
$ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy; go mod vendor
```
> where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788
mpatlasov added a commit to mpatlasov/vmware-vsphere-csi-driver that referenced this pull request Oct 19, 2023
…VE-2023-37788

The content of this patch resulted from:
```
$ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy; go mod vendor
```
where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788
mpatlasov added a commit to mpatlasov/vmware-vsphere-csi-driver that referenced this pull request Oct 19, 2023
…VE-2023-37788

The content of this patch resulted from:
```
$ go get -u github.com/elazarl/goproxy@f99041a5c0273fcf6a144498b458a630585872f; go mod tidy; go mod vendor
```
where `f99041a5c` is commit-id corresponding to elazarl/goproxy#507 which resolved CVE-2023-37788
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants