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

Fix Account reentrant signature reutilization bug #347

Merged
merged 2 commits into from May 31, 2022

Conversation

andrew-fleming
Copy link
Collaborator

Resolves #344.

This PR fixes the reentrant signature reutilization bug by checking that the caller of the Account's __execute__ method is the zero address. Further, this PR proposes to include a mock contract with a malicious function (created by @Solpatium) along with a reentrant call test. Finally, this PR also updates the Account tests to follow the memoization pattern—ensuring current and subsequent Account tests each run from a clean state.

@0xLaplace
Copy link

0xLaplace commented May 31, 2022

@frangio @martriay why is this not being merged faster than light?

Copy link
Contributor

@JulissaDantes JulissaDantes 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!

Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

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

Thank you @andrew-fleming!

@frangio frangio merged commit fa42ab3 into OpenZeppelin:main May 31, 2022
@andrew-fleming andrew-fleming deleted the fix-account-bug branch May 31, 2022 15:14
@martriay
Copy link
Contributor

@frangio @martriay why is this not being merged faster than light?

‘Dress me slowly, I’m in a hurry’ – Napoleon Bonaparte

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.

Malicious contract can change public key
5 participants