Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set a max limit for decoding ssz objects from p2p #5295

Merged
merged 1 commit into from
Apr 2, 2020

Conversation

prestonvanloon
Copy link
Member

Spec defines a 1Mb chunk size limit that was not enforced in Prysm's network decoder.

https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/p2p-interface.md#configuration

Discovered in fuzz testing when the test tried to send a 84 byte message with a length of over 9000 petabytes.

@prestonvanloon prestonvanloon added Ready For Review A pull request ready for code review Fuzz Anything fuzz testing related! labels Apr 2, 2020
@codecov
Copy link

codecov bot commented Apr 2, 2020

Codecov Report

Merging #5295 into master will increase coverage by 16.78%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           master    #5295       +/-   ##
===========================================
+ Coverage   23.85%   40.64%   +16.78%     
===========================================
  Files         234      233        -1     
  Lines       19716    19361      -355     
===========================================
+ Hits         4704     7869     +3165     
+ Misses      14144    10100     -4044     
- Partials      868     1392      +524

@prylabs-bulldozer prylabs-bulldozer bot merged commit 477b014 into master Apr 2, 2020
@delete-merged-branch delete-merged-branch bot deleted the encoder-fix branch April 2, 2020 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fuzz Anything fuzz testing related! Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants