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 MerkleProof multiproof invariant violation #4367

Merged
merged 2 commits into from
Jun 19, 2023

Conversation

frangio
Copy link
Contributor

@frangio frangio commented Jun 16, 2023

Cherry picked fix for GHSA-wprv-93r4-jj2p with adjustments for custom errors from 4d2383e in release-v4.9.

@frangio frangio requested a review from a team June 16, 2023 22:13
@changeset-bot
Copy link

changeset-bot bot commented Jun 16, 2023

🦋 Changeset detected

Latest commit: bd44698

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openzeppelin-solidity Patch

Not sure what this means? Click here to learn what changesets are.

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

ernestognw
ernestognw previously approved these changes Jun 16, 2023
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.

Neat, thanks!

@ernestognw ernestognw requested a review from Amxx June 16, 2023 22:19
@frangio
Copy link
Contributor Author

frangio commented Jun 17, 2023

Coverage says these new revert statements are not tested, but they are... I'm starting to think solidity-coverage doesn't understand revert statement.

@ernestognw
Copy link
Member

ernestognw commented Jun 17, 2023

Not quite, seems like the test is not hitting the second case. Note that in Codecov appears twice because we have the memory and the calldata version of the same function

Captura de pantalla 2023-06-16 a la(s) 19 50 41

I'll take a look

@frangio
Copy link
Contributor Author

frangio commented Jun 17, 2023

Ah, I see, I was misunderstanding the coverage report. I just pushed a change that covers the right revert statement.

Copy link
Collaborator

@Amxx Amxx left a comment

Choose a reason for hiding this comment

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

Shouldn't we cherrypick the commit that includes the 4.9.2 changelog rather than getting the changeset ?

@frangio
Copy link
Contributor Author

frangio commented Jun 17, 2023

I was planning to merge this then merge the release branch which would remove the changeset and update the changelog and package.json.

Copy link
Collaborator

@Amxx Amxx left a comment

Choose a reason for hiding this comment

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

In a perfect world I would have prefered the 4.9 release branch to bring that into master, and then fix the custom error in a PR that is "string → custom error" ...

... but that is workflow stuff.

code LGTM

@frangio frangio merged commit c95a445 into OpenZeppelin:master Jun 19, 2023
@frangio frangio deleted the cherrypick-merklemultiproof branch June 19, 2023 18:55
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.

3 participants