Beginner FriendlyFoundryBridge
100 EXP
View results
Submission Details
Severity: low
Invalid

Risk of Renouncing Ownership

Vulnerability Details

The vulnerability in this case concerns the ability of the contract owner to renounce ownership. This feature is inherent to the OpenZeppelin Ownable contract, which is used in several contracts within this project, such as L1BossBridge, L1Vault, and TokenFactory. The renounceOwnership function, when executed, transfers the ownership of the contract to the zero address (0x0), effectively leaving the contract without an owner.

Renouncing ownership is irreversible and removes any functionality that is only available to the owner. This includes critical administrative functions marked with the onlyOwner modifier. If the owner inadvertently or intentionally renounces ownership, it could render certain functionalities of the contract inoperable, potentially impacting the contract's intended operations and governance.

File: L1BossBridge.sol
contract L1BossBridge is Ownable, Pausable, ReentrancyGuard {
...
// Inherited from Ownable
function renounceOwnership() public virtual onlyOwner {
...
}
...
}

Impact

The impact of this vulnerability is significant. If ownership is renounced, either intentionally or accidentally, it will disable all onlyOwner functionalities. This could include critical actions like updating configurations, pausing/unpausing the contract, or upgrading the contract in case of an emergency or for improvements. The inability to perform these actions can pose a serious risk to the contract's security and functionality.

Recommendations

To mitigate this risk, it is recommended to either:

  1. Reimplement the renounceOwnership function to disable it: This can be done by overriding the function in the derived contract and removing its body or by making it revert. This approach will prevent the possibility of renouncing ownership entirely.

  2. Clearly Specify Contract Design: If renouncing ownership is a deliberate part of the contract's design for decentralization or other reasons, this should be clearly documented. Additionally, mechanisms should be in place to ensure that the contract can operate effectively without an owner, or that a new form of governance can take over the necessary administrative functions.

contract L1BossBridge is Ownable, Pausable, ReentrancyGuard {
...
/**
* @dev Overriding renounceOwnership to prevent renouncing ownership of the contract.
*/
function renounceOwnership() public override onlyOwner {
revert("Renouncing ownership is disabled");
}
...
}

This revised implementation ensures that the ownership cannot be renounced, thereby maintaining the necessary administrative control for the contract's operation and preventing accidental loss of control.

Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.