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

SMTChecker: Fix encoding of arguments of cryptographic functions #15749

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

blishko
Copy link
Contributor

@blishko blishko commented Jan 21, 2025

For example, the function ecrecover expect an argument of type fixed bytes, but due to implicit conversion, you can also pass a string literal. We previously did not take this into account in the encoding into SMT, which could let to SMT expressions having wrong sorts.

Fixes #15736.

@blishko blishko marked this pull request as ready for review January 21, 2025 21:02
@cameel cameel added the smt label Jan 21, 2025
cameel
cameel previously approved these changes Jan 21, 2025
Copy link
Member

@cameel cameel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but the changelog entry could be more specific and the test could use different literal types for better coverage.

Changelog.md Outdated Show resolved Hide resolved
@cameel
Copy link
Member

cameel commented Jan 21, 2025

#15750 fixes the codespell failure.

For example, the function ecrecover expect an argument of type fixed
bytes, but due to implicit conversion, you can also pass a string
literal. We previously did not take this into account in the encoding
into SMT, which could let to SMT expressions having wrong sorts.
@cameel cameel merged commit d5d4558 into develop Jan 22, 2025
73 checks passed
@cameel cameel deleted the smt-fix-crypto-with-string branch January 22, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SMTChecker: ICE when passing a string literal to ecrecover()
2 participants