Skip to content

[internal-branch.go1.20-vendor] http2/hpack: avoid quadratic complexi… #14

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

Conversation

meslubi2021
Copy link
Collaborator

…ty in hpack decoding

When parsing a field literal containing two Huffman-encoded strings, don't decode the first string until verifying all data is present. Avoids forced quadratic complexity when repeatedly parsing a partial field, repeating the Huffman decoding of the string on each iteration.

Thanks to Philippe Antoine (Catena cyber) for reporting this issue.

Fixes golang/go#57855
Fixes CVE-2022-41723
For golang/go#58356

Change-Id: I58a743df450a4a4923dddd5cf6bb0592b0a7bdf3 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1688184
TryBot-Result: Security TryBots [email protected]
Reviewed-by: Julie Qiu [email protected]
Run-TryBot: Damien Neil [email protected]
Reviewed-by: Roland Shoemaker [email protected]
Reviewed-on: https://go-review.googlesource.com/c/net/+/468135
Run-TryBot: Michael Pratt [email protected]
Reviewed-by: Roland Shoemaker [email protected]
Reviewed-by: Than McIntosh [email protected]
Auto-Submit: Michael Pratt [email protected]
TryBot-Result: Gopher Robot [email protected]
(cherry picked from commit 8e2b117) Reviewed-on: https://go-review.googlesource.com/c/net/+/468336

…ty in hpack decoding

When parsing a field literal containing two Huffman-encoded strings,
don't decode the first string until verifying all data is present.
Avoids forced quadratic complexity when repeatedly parsing a partial
field, repeating the Huffman decoding of the string on each iteration.

Thanks to Philippe Antoine (Catena cyber) for reporting this issue.

Fixes golang/go#57855
Fixes CVE-2022-41723
For golang/go#58356

Change-Id: I58a743df450a4a4923dddd5cf6bb0592b0a7bdf3
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1688184
TryBot-Result: Security TryBots <[email protected]>
Reviewed-by: Julie Qiu <[email protected]>
Run-TryBot: Damien Neil <[email protected]>
Reviewed-by: Roland Shoemaker <[email protected]>
Reviewed-on: https://go-review.googlesource.com/c/net/+/468135
Run-TryBot: Michael Pratt <[email protected]>
Reviewed-by: Roland Shoemaker <[email protected]>
Reviewed-by: Than McIntosh <[email protected]>
Auto-Submit: Michael Pratt <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
(cherry picked from commit 8e2b117)
Reviewed-on: https://go-review.googlesource.com/c/net/+/468336
@meslubi2021 meslubi2021 self-assigned this Dec 13, 2024
@meslubi2021 meslubi2021 merged commit 6469ecb into Unity-and-wireless-communications:main Dec 13, 2024
3 checks passed
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.

net/http: avoid quadratic complexity in HPACK decoding (CVE-2022-41723)
2 participants