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

Constructor ghost corruption #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Czar102
Copy link

@Czar102 Czar102 commented Sep 28, 2023

There is no way I could figure out to constrain the constructor not to modify state… But! One of the ghosts was originally written in a way that using SSTORE on the same slot of _voted causes the voters count to be increased by 1… It's not possible to exploit because the original program wouldn't invoke _voted SSTORE twice, nevertheless we can trick it a bit. So merging those two issues in spec, we can do what just happened here.

This change needs to be in constructor because the vote function is heavily constrained and spec wouldn't allow for arbitrary voteTo invocation there, or anywhere else in functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant