Bug 2230890 (CVE-2023-33953)

Summary: CVE-2023-33953 gRPC: hpack table accounting errors can lead to denial of service
Product: [Other] Security Response Reporter: Mauro Matteo Cascella <mcascell>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: aarif, aazores, abarbaro, adistefa, adudiak, agarcial, alcohan, amctagga, anjoseph, ansmith, aoconnor, aprice, asatyam, asegurap, bbuckingham, bdettelb, bniver, brainfor, caswilli, cdaley, chazlett, ckandaga, cmah, code, danken, dfreiber, dhanak, dholler, diagrawa, dkuc, doconnor, drow, dsimansk, dymurray, eaguilar, ebaron, eglynn, ehelms, fdeutsch, fjansen, flucifre, ggainey, gkamathe, gmeno, gparvin, hkataria, ibolton, jburrell, jcantril, jchui, jforrest, jhe, jjoyce, jkang, jkoehler, jmatthew, jmitchel, jmontleo, jolong, jpallich, jprabhak, jsamir, jschluet, jsherril, jtanner, juwatts, jwendell, kaycoth, kgaikwad, kholdawa, kingland, kshier, ktsao, kverlaen, lbainbri, lchilton, lgamliel, lhh, lphiri, lsharar, lsvaty, luizcosta, matzew, mbenjamin, mbocek, mburns, mgarciac, mhackett, mhulan, mkleinhe, mnovotny, mpierce, mrajanna, muagarwa, mwringe, nboldt, njean, nmoumoul, nweather, odf-bz-bot, oezr, omaciel, orabin, oramraz, owatkins, pahickey, pcreech, peholase, pgaikwad, pgrist, phoracek, pierdipi, pjindal, psegedy, psrna, pvasanth, rbobbitt, rcernich, rchan, rfreiman, rguimara, rhaigner, rhos-maint, rhuss, rjohnson, rochandr, rogbas, rojacob, rtaniwa, sabiswas, sakbas, saroy, sdawley, sfeifer, sfroberg, slucidi, smallamp, smullick, sostapov, sseago, stcannon, sthirugn, stirabos, teagle, thason, tkral, tnielsen, twalsh, vereddy, vkrizan, vkumar, vmugicag, whayutin, wtam, yguenane, ypadia, zkayyali
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2231220, 2231221, 2231222    
Bug Blocks: 2230893    

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

Comment 7 errata-xmlrpc 2024-12-03 16:16:54 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:10761 https://access.redhat.com/errata/RHSA-2024:10761