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 dirty bits in upper bits in implementation address in Clones.sol #5069

Merged
merged 7 commits into from
Jun 14, 2024

Conversation

Amxx
Copy link
Collaborator

@Amxx Amxx commented Jun 6, 2024

Revert 8b2f29c (#4927) that introduced vulnerability to dirty upper bits in the implementation address

PR Checklist

  • Tests

vulnerability to dirty upper bits in the implementation address
Copy link

changeset-bot bot commented Jun 6, 2024

⚠️ No Changeset found

Latest commit: 1d49361

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

test/proxy/Clones.t.sol Outdated Show resolved Hide resolved
test/proxy/Clones.t.sol Outdated Show resolved Hide resolved
test/proxy/Clones.t.sol Outdated Show resolved Hide resolved
test/proxy/Clones.t.sol Show resolved Hide resolved
@ernestognw
Copy link
Member

Tried using testSymbolic to formally verify it with halmos but turns out 0x3c is an unsupported opcode.
Fuzzing is enough here imo

@ernestognw ernestognw requested a review from cairoeth June 11, 2024 03:21
@ernestognw ernestognw changed the title Clones.sol: fix issue with dirty upper bits in implementation address Fix dirty bits in upper bits in implementation address in Clones.sol Jun 11, 2024
test/proxy/Clones.t.sol Outdated Show resolved Hide resolved
test/proxy/Clones.t.sol Outdated Show resolved Hide resolved
Copy link
Member

@ernestognw ernestognw left a comment

Choose a reason for hiding this comment

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

LGTM

@ernestognw ernestognw merged commit 83c7e45 into OpenZeppelin:master Jun 14, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants