Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Validate container size against total message size
Summary: For performance reasons we preallocate golang containers with the size given in the field header. This allowed an attacker to trigger very large memory allocations and potentially crash the server with small messages. Before creating the golang container confirm that the message is theoretically large enough to contain a list/map/set of the given size. This requires that the binary and compact protocols use transports that can expose the amount of data waiting to be read. As a result of this change you will not be able to do things like use the raw socket transport or talk to endpoints over the HTTP transport that don't send a content length header. Fixes CVE-2019-11939. Differential Revision: D19595758 fbshipit-source-id: 48bb9dbaf0467cea7a54602f0b07b00a8755c3f9
- Loading branch information
1 parent
c880089
commit 483ed86
Showing
6 changed files
with
157 additions
and
36 deletions.
There are no files selected for viewing
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
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