Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 1.13 KB

File metadata and controls

29 lines (18 loc) · 1.13 KB

Elegant Carbon Nightingale

Medium

Permanent Lock vulnerability in HatsSignerGate contract

Summary

The absence of a function to unlock the HatsSignerGate contract results in a permanent locked state. Once locked, the contract cannot be unlocked, preventing the owner from calling permissioned functions.

Root Cause

In the HatsSignerGate contract, once the locked state is set to true, there is no mechanism to reset it to false. This leads to the contract being permanently locked, rendering the owner unable to perform actions that require permission.

HatsSignerGate::_lock function:

function _lock() internal {
  locked = true;
  emit HSGLocked();
}

Impact

The HatsSignerGate contract becomes permanently locked, making all permissioned functions inaccessible to the owner.

Mitigation

Add a function to change the locked state back to false. This function should be restricted to the owner of the contract to ensure secure and intentional unlocking.