safe-global / safe-modules

A collection of modules that can be used with the Safe contract
GNU Lesser General Public License v3.0
151 stars 74 forks source link

L-1: Add a reset period check to prevent the transaction failing and using all gas #492

Closed mmv08 closed 2 months ago

mmv08 commented 2 months ago

This PR fixes a low severity audit finding by Ackee:

It is possible to set the resetTimeMin to 0. When the resetBaseMin is bigger than 0 and the resetTimeMin is 0, then the branch with modulo operation is triggered and it will cause a division by zero. Since it is also in Solidity version <0.8.0, it consumes all gas.

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 10769742819

Details


Totals Coverage Status
Change from base Build 10631177759: 0.5%
Covered Lines: 100
Relevant Lines: 128

💛 - Coveralls