code-423n4 / 2021-08-yield-findings

1 stars 0 forks source link

EmergencyBrake.sol: Permissions cannot be re-planned after termination #21

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

hickuphh3

Vulnerability details

Impact

Given a configuration of target, contacts and permissions, calling terminate() will permanently prevent this configuration from being used again because the state becomes State.TERMINATED. All other functions require the configuration to be in the other states (UNKNOWN, PLANNED, or EXECUTED).

In other words, the removal of the restoring option for the configuration through EmergencyBrake is permanent.

Recommended Mitigation Steps

Since EmergencyBrake cannot reinstate permissions after termination, it would be better to have terminate change its state to UNKNOWN. The TERMINATED state can therefore be removed.

alcueca commented 3 years ago

That's right.

alcueca commented 3 years ago

Fix