Open code423n4 opened 1 year ago
GalloDaSballo marked the issue as primary issue
We had an internal discussion about it. Governance could upgrade the contracts but even if the ImmutableSplitsDriver
is not upgradeable we could upgrade the DripsHub contract and introduce special handling for the ImmutableSplitsDriver
.
In general, it is a trade-off of Governance itself.
[disagree with severity: QA or dispute validity] What Manuel said, the protocol governance's good will is necessary for the entire thing to work. If the governance decides to freeze any of the Managed contracts, their ownership can always be given to the zero address.
CodeSandwich marked the issue as disagree with severity
I believe the instance of Admin Privilege to be downgradeable because of public disclosure + a public V1
That said I think the finding has some validity, am thinking QA Low as a Gotcha
L
GalloDaSballo changed the severity to QA (Quality Assurance)
GalloDaSballo marked the issue as grade-c
GalloDaSballo marked the issue as grade-a
Lines of code
https://github.com/code-423n4/2023-01-drips/blob/9fd776b50f4be23ca038b1d0426e63a69c7a511d/src/ImmutableSplitsDriver.sol#L11
Vulnerability details
The
ImmutableSplitsDriver
contract is considered to implement immutable splits. However, as the contract inherits from theManaged
contract, which allows the contract admin to upgrade the contract, splits are not immutable.Impact
The admin of the
ImmutableSplitsDriver
contract can upgrade the contract to add functionality that allows updating previously considered immutable splits.Proof of Concept
ImmutableSplitsDriver.sol#L11
Managed.sol#L18
The
Managed
contract inherits from theUUPSUpgradeable
contract, which allows the contract admin to upgrade the contract.scripts/deploy.sh#L141-L154
The
ImmutableSplitsDriver
contract is deployed in thedeploy.sh
script with theManagedProxy
contract, which allows the contract admin (i.e.,SPLITS_DRIVER_ADMIN
- governance address) to upgrade the contract.Tools Used
Manual review
Recommended mitigation steps
Consider removing the upgrade functionality from the
ImmutableSplitsDriver
contract.