Bug 2230890 (CVE-2023-33953) - CVE-2023-33953 gRPC: hpack table accounting errors can lead to denial of service
Summary: CVE-2023-33953 gRPC: hpack table accounting errors can lead to denial of service
Keywords:
Status: NEW
Alias: CVE-2023-33953
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On: 2231220 2231222 2231221
Blocks: 2230893
TreeView+ depends on / blocked
 
Reported: 2023-08-10 08:33 UTC by Mauro Matteo Cascella
Modified: 2023-08-11 14:40 UTC (History)
5 users (show)

Fixed In Version: gRPC 1.53.2, gRPC 1.54.3, gRPC 1.55.2, gRPC 1.56.2, gRPC 1.57
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the gRPC lib. This vulnerability allows hpack table accounting errors that could lead to unwanted disconnects between clients and servers in exceptional cases. This issue leads to Unbounded memory buffering in the HPACK parser and Unbounded CPU consumption in the HPACK parser.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Mauro Matteo Cascella 2023-08-10 08:33:53 UTC
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

Reference:
https://cloud.google.com/support/bulletins#gcp-2023-022

Comment 2 Avinash Hanwate 2023-08-11 04:56:43 UTC
Created flatbuffers tracking bugs for this issue:

Affects: fedora-all [bug 2231221]


Created grpc tracking bugs for this issue:

Affects: fedora-all [bug 2231222]
Affects: openstack-rdo [bug 2231220]

Comment 3 Ben Beasley 2023-08-11 14:40:35 UTC
Analysis in [1]. For the grpc package, this requires an ABI-incompatible upgrade version to a current version, which is blocked by the need to upgrade protobuf to v4 (22.x, 23.x, …), a major breaking update with very widespread impact.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=2231222#c2


Note You need to log in before you can comment on or make changes to this bug.