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

an serious overflow may happen when transfer cryptocurrency #105

Open
Kenun99 opened this issue Jul 11, 2023 · 0 comments
Open

an serious overflow may happen when transfer cryptocurrency #105

Kenun99 opened this issue Jul 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Kenun99
Copy link

Kenun99 commented Jul 11, 2023

Description

Smart contract can transfer cryptocurrency indicated by a uint256 value, which frontier only use the last 128bits as the actual amount. see https://github.com/ParaState/frontier/blob/9524d91ce301afda80c0686ca87bd33a8c63d106/frame/vm/src/runner/stack.rs#L1006

The attacker can withdraw 1<<128 + 1 WETH token from the WETH but pay 1 wei Ether.

@Kenun99 Kenun99 added the bug Something isn't working label Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant