Skip to content

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

Closed

Description

@neild

A maliciously crafted HTTP/2 stream could cause excessive CPU consumption in the HPACK decoder, sufficient to cause a denial of service from a small number of small requests.

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

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

This is a PRIVATE issue for CVE-2022-41723, tracked in http://b/262602307 and fixed by http://tg/1688184.

Activity

  1. added
    NeedsFixThe path to resolution is known, but the work has not been done.
    on Jan 17, 2023
  2. added this to the Go1.20 milestone on Jan 20, 2023
  3. modified the milestones: Go1.20, Go1.21 on Feb 1, 2023
  4. rolandshoemaker commented on Feb 6, 2023

    @rolandshoemaker
    Member

    @gopherbot please open backport issues.

  5. gopherbot commented on Feb 6, 2023

    @gopherbot
    Contributor

    Backport issue(s) opened: #58355 (for 1.19), #58356 (for 1.20).

    Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

  6. gopherbot commented on Feb 14, 2023

    @gopherbot
    Contributor

    Change https://go.dev/cl/468118 mentions this issue: [release-branch.go1.19] net/http: update bundled golang.org/x/net/http2

  7. gopherbot commented on Feb 14, 2023

    @gopherbot
    Contributor

    Change https://go.dev/cl/468122 mentions this issue: [release-branch.go1.20] net/http: update bundled golang.org/x/net/http2

  8. gopherbot commented on Feb 14, 2023

    @gopherbot
    Contributor

    Change https://go.dev/cl/468135 mentions this issue: http2/hpack: avoid quadratic complexity in hpack decoding

  9. gopherbot commented on Feb 14, 2023

    @gopherbot
    Contributor

    Change https://go.dev/cl/468295 mentions this issue: all: update vendored golang.org/x/net

  10. changed the title [-]security: fix CVE-2022-41723[/-] [+]net/http: avoid quadratic complexity in HPACK decoding (CVE-2022-41723)[/+] on Feb 14, 2023
  11. 9 remaining items

  12. benjsmi commented on Mar 3, 2023

    @benjsmi

    So, looking at https://pkg.go.dev/vuln/GO-2023-1571, it looks like the net/http is impacted even if or even though you update/upgrade any references to golang.org/x/net to v0.7.0... Right?

    If we upgrade golang.org/x/net to v0.7.0 and leave Golang at, say, v1.18.x, are we still vulnerable to this?

  13. neild commented on Mar 3, 2023

    @neild
    ContributorAuthor

    If you upgrade golang.org/x/net to v0.7.0 and use http2.ConfigureServers/http2.ConfigureTransport to override the bundled HTTP/2, then you are not vulnerable.

    Unfortunately, we don't have a good way for govulncheck to detect the case where the standard library's bundled HTTP/2 support is present but unused.

  14. bisonliao commented on Apr 19, 2023

    @bisonliao

    I use go 1.15,how should I do ? upgrade my go to 1.21? It will be a horrible mission. Can I just upgrade net package ? thank you.

  15. locked and limited conversation to collaborators on Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.Security

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址