Skip to content

net/http: limit canonical header cache by bytes, not entries (CVE-2022-41717) #56350

Closed
@neild

Description

@neild

This is a PRIVATE issue for CVE-2022-41717 tracked in http://b/253471637.

net/http: limit canonical header cache by bytes, not entries

An attacker can cause excessive memory growth in a Go server accepting HTTP/2 requests.

HTTP/2 server connections contain a cache of HTTP header keys sent by the client. While the total number of entries in this cache is capped, an attacker sending very large keys can cause the server to allocate approximately 64 MiB per open connection.

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

Thanks to Josselin Costanzi for reporting this issue.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions