Skip to content

Added control for the nil request#507

Merged
elazarl merged 3 commits intoelazarl:masterfrom
g0ku704:fix_empty_req
Jul 31, 2023
Merged

Added control for the nil request#507
elazarl merged 3 commits intoelazarl:masterfrom
g0ku704:fix_empty_req

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

@g0ku704 g0ku704 requested a review from mpatlasov July 21, 2023 02:25
@mpatlasov
Copy link

/lgtm

https.go Outdated
}
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
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

Development

Successfully merging this pull request may close these issues.

goproxy v1.1 was discovered to contain an issue which can lead to Denial of Service (DoS) via unspecified vectors

5 participants