Skip to content

chore(deps): golang.org/x/net#158

Merged
nywilken merged 1 commit intomainfrom
chore(deps)/golang.org/x/net
Nov 13, 2023
Merged

chore(deps): golang.org/x/net#158
nywilken merged 1 commit intomainfrom
chore(deps)/golang.org/x/net

Conversation

@tenthirtyam
Copy link
Copy Markdown
Collaborator

Summary

Address the following CVEs for golang.org/x/net:

CVE-2023-39325

HTTP/2 rapid reset can cause excessive work in net/http

A malicious HTTP/2 client which rapidly creates requests and immediately resets them can cause excessive server resource consumption. While the total number of requests is bounded by the http2.Server.MaxConcurrentStreams setting, resetting an in-progress request allows the attacker to create a new request while the existing one is still executing.

With the fix applied, HTTP/2 servers now bound the number of simultaneously executing handler goroutines to the stream concurrency limit (MaxConcurrentStreams). New requests arriving when at the limit (which can only happen after the client has reset an existing, in-flight request) will be queued until a handler exits. If the request queue grows too large, the server will terminate the connection.

This issue is also fixed in golang.org/x/net/http2 for users manually configuring HTTP/2.

The default stream concurrency limit is 250 streams (requests) per HTTP/2 connection. This value may be adjusted using the golang.org/x/net/http2 package; see the Server.MaxConcurrentStreams setting and the ConfigureServer function.

CVE-2023-44487

swift-nio-http2 is vulnerable to a denial-of-service vulnerability in which a malicious client can create and then reset a large number of HTTP/2 streams in a short period of time. This causes swift-nio-http2 to commit to a large amount of expensive work which it then throws away, including creating entirely new Channels to serve the traffic. This can easily overwhelm an EventLoop and prevent it from making forward progress.

swift-nio-http2 1.28 contains a remediation for this issue that applies reset counter using a sliding window. This constrains the number of stream resets that may occur in a given window of time. Clients violating this limit will have their connections torn down. This allows clients to continue to cancel streams for legitimate reasons, while constraining malicious actors.

CVE-2023-3978

Text nodes not in the HTML namespace are incorrectly literally rendered, causing text which should be escaped to not be. This could lead to an XSS attack.

Changes

➜ go get -u golang.org/x/net          
go: downloading golang.org/x/net v0.18.0
go: downloading golang.org/x/term v0.14.0
go: downloading golang.org/x/text v0.14.0
go: downloading golang.org/x/crypto v0.15.0
go: downloading golang.org/x/sys v0.14.0
go: upgraded golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 => v0.15.0
go: upgraded golang.org/x/net v0.8.0 => v0.18.0
go: upgraded golang.org/x/sys v0.6.0 => v0.14.0
go: upgraded golang.org/x/term v0.6.0 => v0.14.0
go: upgraded golang.org/x/text v0.8.0 => v0.14.0

packer-plugin-vmware on  main [!] via 🐹 v1.21.4 took 8.7s 
➜ go mod tidy
go: downloading github.com/hashicorp/packer-plugin-sdk v0.5.1
go: downloading github.com/hashicorp/hcl/v2 v2.16.2
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/nywilken/go-cty v1.12.1
go: downloading github.com/stretchr/testify v1.7.0
go: downloading github.com/hashicorp/go-getter/v2 v2.2.0
go: downloading github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed
go: downloading github.com/vmware/govmomi v0.26.0
go: downloading github.com/google/go-cmp v0.5.9
go: downloading github.com/hashicorp/go-version v1.6.0
go: downloading github.com/masterzen/winrm v0.0.0-20210623064412-3b76017826b0
go: downloading golang.org/x/mobile v0.0.0-20210901025245-1fde1d6c3ca1
go: downloading github.com/hashicorp/go-getter/gcs/v2 v2.2.0
go: downloading github.com/hashicorp/go-getter/s3/v2 v2.2.0
go: downloading github.com/mitchellh/go-fs v0.0.0-20180402235330-b7b9ca407fff
go: downloading github.com/mitchellh/iochan v1.0.0
go: downloading github.com/google/uuid v1.3.0
go: downloading github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869
go: downloading github.com/mitchellh/mapstructure v1.4.1
go: downloading github.com/mitchellh/reflectwalk v1.0.0
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading golang.org/x/sync v0.1.0
go: downloading github.com/ryanuber/go-glob v1.0.0
go: downloading github.com/pkg/sftp v1.13.2
go: downloading github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
go: downloading github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493
go: downloading github.com/ugorji/go/codec v1.2.6
go: downloading github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db
go: downloading github.com/dylanmei/winrmtest v0.0.0-20170819153634-c2fbb09e6c08
go: downloading github.com/aws/aws-sdk-go v1.44.114
go: downloading github.com/agext/levenshtein v1.2.3
go: downloading github.com/gofrs/flock v0.8.1
go: downloading github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c
go: downloading github.com/ChrisTrenkamp/goxpath v0.0.0-20210404020558-97928f7e12b6
go: downloading github.com/gofrs/uuid v4.0.0+incompatible
go: downloading github.com/masterzen/simplexml v0.0.0-20190410153822-31eea3082786
go: downloading gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15
go: downloading cloud.google.com/go/storage v1.27.0
go: downloading google.golang.org/api v0.101.0
go: downloading github.com/hashicorp/consul/api v1.10.1
go: downloading github.com/hashicorp/vault/api v1.1.1
go: downloading github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d
go: downloading github.com/hashicorp/go-cleanhttp v0.5.2
go: downloading github.com/hashicorp/go-safetemp v1.0.0
go: downloading github.com/klauspost/compress v1.11.2
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/mitchellh/go-testing-interface v1.14.1
go: downloading cloud.google.com/go v0.105.0
go: downloading github.com/ulikunitz/xz v0.5.10
go: downloading github.com/apparentlymart/go-textseg/v13 v13.0.0
go: downloading github.com/mitchellh/go-wordwrap v1.0.1
go: downloading github.com/kr/fs v0.1.0
go: downloading github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0
go: downloading github.com/satori/go.uuid v1.2.0
go: downloading github.com/dylanmei/iso8601 v0.1.0
go: downloading github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading github.com/kr/pretty v0.2.0
go: downloading github.com/hashicorp/go-hclog v0.16.2
go: downloading github.com/hashicorp/go-rootcerts v1.0.2
go: downloading github.com/hashicorp/serf v0.9.5
go: downloading github.com/hashicorp/consul/sdk v0.8.0
go: downloading github.com/hashicorp/go-uuid v1.0.2
go: downloading github.com/cenkalti/backoff/v3 v3.2.2
go: downloading github.com/hashicorp/go-retryablehttp v0.7.0
go: downloading github.com/hashicorp/vault/sdk v0.2.1
go: downloading golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
go: downloading gopkg.in/square/go-jose.v2 v2.6.0
go: downloading github.com/go-test/deep v1.0.3
go: downloading cloud.google.com/go/compute/metadata v0.1.1
go: downloading cloud.google.com/go/compute v1.12.1
go: downloading cloud.google.com/go/iam v0.6.0
go: downloading github.com/googleapis/gax-go/v2 v2.6.0
go: downloading golang.org/x/oauth2 v0.1.0
go: downloading google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c
go: downloading google.golang.org/grpc v1.50.1
go: downloading google.golang.org/protobuf v1.28.1
go: downloading github.com/golang/protobuf v1.5.2
go: downloading golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
go: downloading github.com/antchfx/xpath v1.1.11
go: downloading github.com/kr/text v0.2.0
go: downloading github.com/fatih/color v1.12.0
go: downloading github.com/mattn/go-colorable v0.1.8
go: downloading github.com/mattn/go-isatty v0.0.13
go: downloading github.com/armon/go-metrics v0.3.9
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/hashicorp/go-msgpack v0.5.5
go: downloading github.com/hashicorp/memberlist v0.2.2
go: downloading github.com/stretchr/objx v0.1.1
go: downloading github.com/hashicorp/go-sockaddr v1.0.2
go: downloading go.opencensus.io v0.23.0
go: downloading google.golang.org/appengine v1.6.7
go: downloading github.com/golang/snappy v0.0.4
go: downloading github.com/pierrec/lz4 v2.6.1+incompatible
go: downloading github.com/hashicorp/go-immutable-radix v1.3.1
go: downloading github.com/pascaldekloe/goe v0.1.0
go: downloading github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c
go: downloading github.com/miekg/dns v1.1.26
go: downloading github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529
go: downloading github.com/jmespath/go-jmespath v0.4.0
go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
go: downloading github.com/google/martian/v3 v3.2.1
go: downloading github.com/googleapis/enterprise-certificate-proxy v0.2.0
go: downloading github.com/hashicorp/golang-lru v0.5.4
go: downloading cloud.google.com/go/longrunning v0.1.1
go: downloading github.com/jmespath/go-jmespath/internal/testify v1.5.1
go: downloading gopkg.in/yaml.v2 v2.3.0
go: downloading github.com/frankban/quicktest v1.10.0

Reference

Closes https://github.com/hashicorp/packer-plugin-vmware/security/dependabot/22
Closes https://github.com/hashicorp/packer-plugin-vmware/security/dependabot/21
Closes https://github.com/hashicorp/packer-plugin-vmware/security/dependabot/19

Address the following CVEs:

- CVE-2023-39325
- CVE-2023-44487
- CVE-2023-3978

Signed-off-by: Ryan Johnson <johnsonryan@vmware.com>
@tenthirtyam tenthirtyam added dependencies Dependencies chore Chore labels Nov 12, 2023
@tenthirtyam tenthirtyam requested a review from nywilken November 12, 2023 17:56
@tenthirtyam tenthirtyam self-assigned this Nov 12, 2023
@tenthirtyam tenthirtyam requested a review from a team as a code owner November 12, 2023 17:56
Copy link
Copy Markdown
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

LGTM

@nywilken nywilken merged commit 7257750 into main Nov 13, 2023
@nywilken nywilken deleted the chore(deps)/golang.org/x/net branch November 13, 2023 10:33
@vmware vmware locked and limited conversation to collaborators Jun 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

chore Chore dependencies Dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants