-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request from GHSA-2jx2-qcm4-rf9h
Motivation: If the server replies early, currently the GRPCWebToHTTPServerCodec takes it upon itself to suppress the rest of the data coming from the client. This design does not match with HTTP/2, where an early return from the server does not suppress this data. As a result, there is no particular reason to have implemented this beyond optimisation. Sadly, this optimisation also opens up a crash vector, because the codec also suppressed the .end message. When combined with the fact that grpc-web re-uses the server state machine, we exposed the server to a crash, because it could see two .heads with no intervening .end. Modifications: Stop suppressing reads, continue to police them and pass them through. Result: Remove a crash vector, stop errors being fatal. Co-authored-by: Cory Benfield <[email protected]>
- Loading branch information
Showing
4 changed files
with
86 additions
and
44 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
FuzzTesting/FailCases/clusterfuzz-testcase-minimized-ServerFuzzer-release-5285159577452544
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
PUT /echo.Echo/Collect HTTP/1.1 | ||
Content-Type:application/grpc | ||
transfer-encoding:cHUnked | ||
|
||
3 | ||
�� | ||
� | ||
|
||
PUT * HTTP/1.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters