ghsa-496j-2rq6-j6cc
Vulnerability from github
Published
2023-08-09 15:30
Modified
2024-07-30 21:37
Severity ?
Summary
Excessive Iteration in gRPC
Details
gRPC contains a vulnerability that allows hpack table accounting errors could lead to unwanted disconnects between clients and servers in exceptional cases/ Three vectors were found that allow the following DOS attacks:
- Unbounded memory buffering in the HPACK parser
- Unbounded CPU consumption in the HPACK parser
The unbounded CPU consumption is down to a copy that occurred per-input-block in the parser, and because that could be unbounded due to the memory copy bug we end up with an O(n^2) parsing loop, with n selected by the client.
The unbounded memory buffering bugs:
- The header size limit check was behind the string reading code, so we needed to first buffer up to a 4 gigabyte string before rejecting it as longer than 8 or 16kb.
- HPACK varints have an encoding quirk whereby an infinite number of 0’s can be added at the start of an integer. gRPC’s hpack parser needed to read all of them before concluding a parse.
- gRPC’s metadata overflow check was performed per frame, so that the following sequence of frames could cause infinite buffering: HEADERS: containing a: 1 CONTINUATION: containing a: 2 CONTINUATION: containing a: 3 etc…
{ "affected": [ { "package": { "ecosystem": "PyPI", "name": "grpcio" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "1.53.2" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "grpcio" }, "ranges": [ { "events": [ { "introduced": "1.54.0" }, { "fixed": "1.54.3" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "grpcio" }, "ranges": [ { "events": [ { "introduced": "1.55.0" }, { "fixed": "1.55.2" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "grpcio" }, "ranges": [ { "events": [ { "introduced": "1.56.0" }, { "fixed": "1.56.2" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "RubyGems", "name": "grpc" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "1.53.2" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "RubyGems", "name": "grpc" }, "ranges": [ { "events": [ { "introduced": "1.54.0" }, { "fixed": "1.54.3" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "RubyGems", "name": "grpc" }, "ranges": [ { "events": [ { "introduced": "1.55.0" }, { "fixed": "1.55.2" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "RubyGems", "name": "grpc" }, "ranges": [ { "events": [ { "introduced": "1.56.0" }, { "fixed": "1.56.2" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2023-33953" ], "database_specific": { "cwe_ids": [ "CWE-770", "CWE-789" ], "github_reviewed": true, "github_reviewed_at": "2024-07-30T10:26:43Z", "nvd_published_at": "2023-08-09T13:15:09Z", "severity": "HIGH" }, "details": "gRPC contains a vulnerability that allows hpack table accounting errors could lead to unwanted disconnects between clients and servers in exceptional cases/\u00a0Three vectors were found that allow the following DOS attacks:\n\n- Unbounded memory buffering in the HPACK parser\n- Unbounded CPU consumption in the HPACK parser\n\nThe unbounded CPU consumption is down to a copy that occurred per-input-block in the parser, and because that could be unbounded due to the memory copy bug we end up with an O(n^2) parsing loop, with n selected by the client.\n\nThe unbounded memory buffering bugs:\n\n- The header size limit check was behind the string reading code, so we needed to first buffer up to a 4 gigabyte string before rejecting it as longer than 8 or 16kb.\n- HPACK varints have an encoding quirk whereby an infinite number of 0\u2019s can be added at the start of an integer. gRPC\u2019s hpack parser needed to read all of them before concluding a parse.\n- gRPC\u2019s metadata overflow check was performed per frame, so that the following sequence of frames could cause infinite buffering: HEADERS: containing a: 1 CONTINUATION: containing a: 2 CONTINUATION: containing a: 3 etc\u2026", "id": "GHSA-496j-2rq6-j6cc", "modified": "2024-07-30T21:37:50Z", "published": "2023-08-09T15:30:15Z", "references": [ { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-33953" }, { "type": "WEB", "url": "https://cloud.google.com/support/bulletins#gcp-2023-022" }, { "type": "ADVISORY", "url": "https://github.com/advisories/GHSA-496j-2rq6-j6cc" }, { "type": "WEB", "url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/grpc/CVE-2023-33953.yml" }, { "type": "WEB", "url": "https://security.snyk.io/vuln/SNYK-RUBY-GRPC-5834442" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "type": "CVSS_V3" } ], "summary": "Excessive Iteration in gRPC" }
Loading...
Loading...
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.