Skip to content
This repository was archived by the owner on Mar 2, 2025. It is now read-only.

Rhaydden - Missing update functionality for compatibilityFallback in setParam function #43

Closed
sherlock-admin2 opened this issue Aug 30, 2024 · 4 comments
Labels
Excluded Excluded by the judge without consulting the protocol or the senior Non-Reward This issue will not receive a payout Sponsor Confirmed The sponsor acknowledged this issue is valid Will Fix The sponsor confirmed this issue will be fixed

Comments

@sherlock-admin2
Copy link
Contributor

sherlock-admin2 commented Aug 30, 2024

Rhaydden

Medium

Missing update functionality for compatibilityFallback in setParam function

Summary

The RumpelWalletFactory contract has no ability to update the compatibilityFallback address after deployment. This could lead to issues if the fallback handler needs to be changed due to upgrades or bugs.

Vulnerability Detail

In the RumpelWalletFactory.sol, the compatibilityFallback address is set during the contract's construction. However, the setParam function, which allows the owner to update various parameters, does not include an option to update the compatibilityFallback address. This omission technically means that once the contract is deployed, the compatibilityFallback address cannot be changed.

Impact

This will render the contract useless. According to Sherlock docs:

How to identify a medium issue:

Breaks core contract functionality, rendering the contract useless or leading to loss of funds.

The inability to update the compatibilityFallback address could result in the need to redeploy the entire contract entirely if the fallback handler needs to be changed. This could be due to an upgrade, a bug in the fallback handler, or other issues.

Code Snippet

https://github.com/sherlock-audit/2024-07-sense-points-marketplace/blob/main/rumpel-wallet/src/RumpelWalletFactory.sol#L85-L93

Tool used

Manual Review

Recommendation

Add an option to update the compatibilityFallback address in the setParam function:

function setParam(bytes32 what, address data) external onlyOwner {
    if (what == "PROXY_FACTORY") proxyFactory = ISafeProxyFactory(data);
    else if (what == "SAFE_SINGLETON") safeSingleton = data;
    else if (what == "RUMPEL_MODULE") rumpelModule = data;
    else if (what == "RUMPEL_GUARD") rumpelGuard = data;
    else if (what == "INITIALIZATION_SCRIPT") initializationScript = data;
+    else if (what == "COMPATIBILITY_FALLBACK") compatibilityFallback = data; // Add this line
    else revert UnrecognizedParam(what);
    emit ParamChanged(what, data);
}
@sherlock-admin3 sherlock-admin3 added Sponsor Confirmed The sponsor acknowledged this issue is valid Will Fix The sponsor confirmed this issue will be fixed labels Aug 30, 2024
@github-actions github-actions bot closed this as completed Sep 1, 2024
@github-actions github-actions bot added the Excluded Excluded by the judge without consulting the protocol or the senior label Sep 1, 2024
@Alireza-Razavi
Copy link
Collaborator

This seems to be low due to sponsor's comment:

This does not meet the criteria for a medium. There is an unlikely possibility that upgrading the singleton or safe factory would require also updating the compatibility fallback handler. however, this does not lead to loss of funds or make the contract useless. It just limits the flexibility of out future upgrade plans.

@sherlock-admin2 sherlock-admin2 changed the title Clever Tartan Scallop - Missing update functionality for compatibilityFallback in setParam function Rhaydden - Missing update functionality for compatibilityFallback in setParam function Sep 3, 2024
@sherlock-admin2 sherlock-admin2 added the Non-Reward This issue will not receive a payout label Sep 3, 2024
@jparklev
Copy link

jparklev commented Sep 4, 2024

PR fix: sense-finance/rumpel-wallet#5

@sherlock-admin2
Copy link
Contributor Author

The protocol team fixed this issue in the following PRs/commits:
sense-finance/rumpel-wallet#5

@sherlock-admin2
Copy link
Contributor Author

The Lead Senior Watson signed off on the fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Excluded Excluded by the judge without consulting the protocol or the senior Non-Reward This issue will not receive a payout Sponsor Confirmed The sponsor acknowledged this issue is valid Will Fix The sponsor confirmed this issue will be fixed
Projects
None yet
Development

No branches or pull requests

4 participants