fix: check payload length and consumed buf for pooled tx#5153
Merged
Conversation
Codecov Report
... and 220 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
mattsse
previously approved these changes
Oct 24, 2023
mattsse
approved these changes
Oct 26, 2023
Collaborator
mattsse
left a comment
There was a problem hiding this comment.
rlp 👍
there's another thing we should do (separately):
currently, we're always consuming the &mut & however ideally we only advance this when decoding is successful.
see Decode derive macro template for example
Collaborator
|
good to merge @Rjected ? |
Collaborator
|
needs rebase @Rjected |
c9227f9 to
b041ef1
Compare
ruint PR should be merged first
b041ef1 to
5bffcc6
Compare
mattsse
pushed a commit
that referenced
this pull request
Nov 8, 2023
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is one of the bugs found by #5125, we were previously allowing decoding of legacy transactions that were shorter than their payload length, as well as legacy transactions that were longer than their payload length. We will need to similarly check header lengths in other manual decodings.
Tests are added that contain RLP strings generated by the fuzzer.