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

[H-03] ABI encodePacked Collision #232

Closed
codehawks-bot opened this issue Aug 6, 2023 · 2 comments
Closed

[H-03] ABI encodePacked Collision #232

codehawks-bot opened this issue Aug 6, 2023 · 2 comments
Labels

Comments

@codehawks-bot
Copy link

[H-03] ABI encodePacked Collision

Severity

High Risk

Relevant GitHub Links

https://github.com/Cyfrin/2023-07-escrow/blob/main/src/EscrowFactory.sol#L71

https://github.com/Cyfrin/2023-07-escrow/blob/main/src/EscrowFactory.sol#L76

Summary

Collision can exist due to the use of many dynamic types in abi.encodePacked

Vulnerability Details

The computeEscrowAddress() function in EscrowFactory.sol calls abi.encodePacked() with multiple dynamic arguments and a collision is possible.

Impact

High impact on the creation of contracts

Tools Used

  • Slither

Recommendations

Do not use more than one dynamic type in abi.encodePacked(). Use abi.encode().

@pinalikefruit
Copy link

The same issue is reported in this case as valid. Cyfrin/2023-08-sparkn#1 (comment)

The difference is that it categorizes badly and should have reported it as low.

@PatrickAlphaC
Copy link
Member

PatrickAlphaC commented Sep 5, 2023

If their is a collision hash, the transaction reverts, or you just redeploy. No loss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants