Description: The unpauseDiamond function allows for a blacklist of facets that should not be reactivated. However, there's no safeguard to prevent the DiamondCutFacet from being included in this blacklist, which could lead to the accidental permanent disabling of upgrade functionality.
Recommendation: Implement a check to ensure that the DiamondCutFacet is never included in the blacklist.
function unpauseDiamond(address[] calldata _blacklist) external {
+ bytes4[] memory selectors;
for (uint256 i; i < _blacklist.length; ) {
+ selectors = LibDiamondLoupe.facetFunctionSelectors(_blacklist[i]);
+ if(selectors[0] == DiamondCutFacet.diamondCut.selector) continue;
// re-add facet and its selectors to diamond
LibDiamond.removeFunctions(
address(0),
+ selectors
);
}
Context: EmergencyPauseFacet.sol#L140
Description: The
unpauseDiamond
function allows for a blacklist of facets that should not be reactivated. However, there's no safeguard to prevent theDiamondCutFacet
from being included in this blacklist, which could lead to the accidental permanent disabling of upgrade functionality.Recommendation: Implement a check to ensure that the DiamondCutFacet is never included in the blacklist.
LI.FI: Fixed in 7709442ae76b0209a93c732c412fcb444216c618
Researcher: Confirmed.