29286 - [SC - Medium] MultiSigWalletremoveOwner - L The bug allows th...
MultiSigWallet::removeOwner() - L127: The bug allows the last owner in the owners array to remain in the array even after being marked as not an owner if they are the one intended for removal.
MultiSigWallet::removeOwner() - L127: The bug allows the last owner in the owners array to remain in the array even after being marked as not an owner if they are the one intended for removal.Description
Brief/Intro
Vulnerability Details
SUMMARY:
NOTE:
Impact Details
POTENTIAL IMPACTS IN SCOPE:
IMPACTS:
References
Proof of Concept
PROOF OF CONCEPT (PoC):
TEST 1: Proving that the bug exists, and that my bugfix works
Test results: bug not fixed: for (uint256 i = 0; i < owners.length - 1; i++)
for (uint256 i = 0; i < owners.length - 1; i++)Test results: bug fixed: for (uint256 i = 0; i < owners.length; i++)
for (uint256 i = 0; i < owners.length; i++)TEST 2: Proving that the unsuccessfully removed owner can never be fully removed ever again, nor replaced
Modified test function used to try remove same owner again:
Test result:
Now lets check if this same unsuccessfully removed owner can be replaced instead via the replaceOwner() function:
replaceOwner() function:Test result:
TEST 3: Proving it's possible for same owner to get duplicated in owners array, enabling double voting/confirmation counts
owners array, enabling double voting/confirmation countsTest result:
TEST 4: Proving that the accuracy of results from isConfirmed() and getConfirmationCount() can be affected
isConfirmed() and getConfirmationCount() can be affectedControl test: the owner has NOT been removed yet, so all is good and NORMAL:
Bonus test: activate my bugfix for exactly the same test conditions as above test, lets see if owner can still double confirm!
TEST 5: Proving it's possible to permanently DoS owners array and ability to vote/confirm transactions
owners array and ability to vote/confirm transactionsTEST 6: Proving it's possible for required to become greater than the number of usable owners/signers
required to become greater than the number of usable owners/signersBUGFIX:
Previous29270 - [SC - High] The main functionality of the contract EarlyZER...Next29288 - [SC - Critical] all NFTs can be stolen by calling VestedZeroNFT...
Last updated
Was this helpful?