-
Notifications
You must be signed in to change notification settings - Fork 0
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
Attacker Can Operate Without Gas #99
Comments
ERC1155 standard |
In onERC1155Received function, attacker can call personalMint() like "personalMint() reentrancy attack #8". |
it is generally unadvised to rely on |
It is not bad to check tx.origin == msg.sender. |
I think it can be low risk at least. |
Attacker can mint without interacting with system. This behavior differs from the intended behavior. So I think it can be low risk. |
Github username: --
Twitter username: --
Submission hash (on-chain): 0x3ca345215bbf885a0ea3fded4f4ff9376d376cf07673e830734fad89d452b4d7
Severity: medium
Description:
Description
Because of IERC1155Receiver(to).onERC1155Received function, recevier can do its own operations. If user calls operateFlowMatrix and sends circle through attacker, attacker can do it without gas.
Attack Scenario
User call operateFlowMatrix and send circles through attacker.
operateFlowMatrix()=>_callAcceptanceChecks()=>_acceptanceCheck()=>_doSafeTransferAcceptanceCheck()=>IERC1155Receiver(to).onERC1155Received(operator, from, id, value, data)
In this function attacker can do operations but he doesn't consume gas. All gas fee will be paid by user.
For example, he can call personalmint()
In the future, it can cause very dangerous problems like re-entrancy attacks.
Consider to check tx.origin == msg.sender in important public/external functions.
Attachments
The text was updated successfully, but these errors were encountered: