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

[hebao][audit] issue 8 #1186

Merged
merged 2 commits into from
May 25, 2020
Merged

[hebao][audit] issue 8 #1186

merged 2 commits into from
May 25, 2020

Conversation

kongliangzhong
Copy link
Collaborator

@kongliangzhong kongliangzhong commented May 23, 2020

  1. MetaTxModule.sol: Relayer can cause transactions to fail by sending just above the limit the user provided.
    Due to the way the VM provides gas to external calls since EIP 150 ws implemented, if the external call is executed with less gas than the ​gasSettings.limit​, only 63/64 of the available gas will be provided, allowing for the relayer to force transactions with a limit lower than the one set by the user.
    A discussion around this issue is available at safeTxGas is not enforced safe-global/safe-smart-account#100
    Recommendation
    Require that the gas available after the call is greater than than 65/64 of the user provided gasSettings.limit.
    For reference: Implementation of the fix by the Gnosis Safe team: safe-global/safe-smart-account@62d4bd3 ca

We followed the recommendation from solidified and add 40000 extra gas requirements.

dong77
dong77 previously approved these changes May 23, 2020
Brechtpd
Brechtpd previously approved these changes May 23, 2020
@dong77 dong77 dismissed stale reviews from Brechtpd and themself via 7c610b8 May 25, 2020 08:42
@dong77 dong77 merged commit 24972c6 into master May 25, 2020
@dong77 dong77 deleted the audit-issue-8 branch May 25, 2020 08:44
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