Auctioneer Cannot Be Removed From The Protocol
The protocol lacks a function to remove an auctioneer from its whitelist once added. If a whitelisted auctioneer is found vulnerable and exploited, the team cannot swiftly remove it, hindering mitigation.
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2022-11-bond-judging/issues/13
Found by
xiaoming90
Summary
If a vulnerable Auctioneer is being exploited by an attacker, there is no way to remove the vulnerable Auctioneer from the protocol.
Vulnerability Detail
The protocol is missing the feature to remove an auctioneer. Once an auctioneer has been added to the whitelist, it is not possible to remove the auctioneer from the whitelist.
https://github.com/sherlock-audit/2022-11-bond/blob/main/src/BondAggregator.sol#L62
File: BondAggregator.sol
62: function registerAuctioneer(IBondAuctioneer auctioneer_) external requiresAuth {
63: // Restricted to authorized addresses
64:
65: // Check that the auctioneer is not already registered
66: if (_whitelist[address(auctioneer_)])
67: revert Aggregator_AlreadyRegistered(address(auctioneer_));
68:
69: // Add the auctioneer to the whitelist
70: auctioneers.push(auctioneer_);
71: _whitelist[address(auctioneer_)] = true;
72: }
Impact
In the event that a whitelisted Auctioneer is found to be vulnerable and has been actively exploited by an attacker in the wild, the protocol needs to mitigate the issue swiftly by removing the vulnerable Auctioneer from the protocol. However, the mitigation effort will be hindered by the fact there is no way to remove an Auctioneer within the protocol once it has been whitelisted. Thus, it might not be possible to stop the attacker from exploiting the vulnerable Auctioneer. The protocol team would need to find a workaround to block the attack, which will introduce an unnecessary delay to the recovery process where every second counts.
Additionally, if the admin accidentally whitelisted the wrong Auctioneer, there is no way to remove it.
Code Snippet
https://github.com/sherlock-audit/2022-11-bond/blob/main/src/BondAggregator.sol#L62
Tool used
Manual Review
Recommendation
Consider implementing an additional function to allow the removal of an Auctioneer from the whitelist, so that vulnerable Auctioneer can be removed swiftly if needed.
function deregisterAuctioneer(IBondAuctioneer auctioneer_) external requiresAuth {
// Remove the auctioneer from the whitelist
_whitelist[address(auctioneer_)] = false;
}
Discussion
Evert0x
Message from sponsor
We acknowledge that a whitelisted Auctioneer cannot be removed from the Aggregator. Auctioneers can be sunset by disallowing new markets to be created. Adding a function to remove a whitelisted auctioneer would effectively give the protocol the ability to shutdown live, user-created markets, which goes against the goal of a permissionless system. Users have the ability to close their own markets if needed.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The contract only implements a function to add auctioneers to the whitelist, with no corresponding function to remove them.
Impact
If a whitelisted auctioneer is exploited, the team cannot remove it, potentially allowing the attacker to continue exploiting it and delaying recovery.
What the attacker needed
Auctioneer must be whitelisted; auctioneer must have a vulnerability
The fix
The report recommends adding a function to remove an auctioneer from the whitelist, but the sponsor declined, stating that removal would allow shutting down live markets, which conflicts with a permissionless system.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
In this smart contract system, an 'auctioneer' is a component that runs auctions. The protocol keeps a list of approved auctioneers, but once one is added, there is no way to take it off the list. If that auctioneer later has a security flaw, the team cannot quickly remove it to stop attacks.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.