-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Lack of range checks in chain operations processing #446
Comments
Can you be more specific where range checks should be done? Are you referring for example to |
Here is a list of potential out-of-bounds accesses that I have discovered: Proposer slashings
Casper slashings
In Attestations
Looks like Exits
I think, general strategy of avoiding any out-of-bounds accesses from inbound data would be to check all index-like numbers against their ranges. |
I believe all your examples are out-of-range list accesses:
Those are handled by Python which throws an |
I think that main concern is that these accesses are not spec'd. I think that a note about potential |
See "code appearing in |
@JustinDrake would something like this work for you? mkalinin#1 |
Feel free to submit a pull request for this clarification and I'll merge it in 👍 |
Problem
There is no range checks for
shard
andvalidator_index
during processing of beacon chain operations. Operation data is an inbound network data and any possible violations in this data should be strictly verified before processing it.IMO, it's better to check ranges explicitly rather than relay on client implementation or a standard behavior that takes place when out of bound index is met.
The text was updated successfully, but these errors were encountered: