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

Detect use of felt252 operations with tainted parameters #37

Merged
merged 14 commits into from
Aug 31, 2023

Conversation

technovision99
Copy link
Contributor

Reports if a felt252 binary operation is used, including the tainted parameters if it is. Also skips analyzing the contractState parameter in external functions since this caused every use of a storage variable to appear tainted.

Known FPs:
Something like a+b+c will get flagged twice since the code gets translated into two additions at the Sierra level
Any equality comparison a == b will get flagged since the code gets translated to felt252_is_zero(felt252_sub(a,b))

@smonicas smonicas merged commit f3eb6d6 into master Aug 31, 2023
4 checks passed
@smonicas smonicas deleted the dev-felt252-detector branch August 31, 2023 15:48
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.

2 participants