A malicious lien buyer can DoS to cause fund loss/lock
A malicious lien buyer can deliver a lien token to a contract they control that implements supportsInterface() with arbitrary code, such as reverting. Because the protocol calls this function in several places, the attacker can block auctions, liquidation and payments, locking funds and collateral.
Source: https://github.com/sherlock-audit/2022-10-astaria-judging/issues/181
Found by
0xRajeev
Summary
A malicious lien buyer can DoS to cause fund loss/lock of other lien holders & borrower collateral.
Vulnerability Detail
Anyone can call buyoutLien to purchase a lien token delivered to an arbitrary receiver. A malicious entity (even the borrower themselves) can purchase a small lien amount with its token delivered to their contract, which can implement supportsInterface() with arbitrary code, e.g. revert, that gets executed by the protocol in multiple places giving the attacker control at those points.
Impact
- An attacker can revert
endAuction()to prevent the release of collateral to the winner. - An attacker can revert
liquidate()to prevent the liquidation from even starting. - An attacker can revert
_payment()to prevent any lien payments from succeeding in calls tomakePayment(uint256 collateralId, uint256 paymentAmount)
Thus, a malicious lien buyer can DoS to cause fund loss/lock of other lien holders & loss/lock of borrower collateral.
Code Snippet
- https://github.com/sherlock-audit/2022-10-astaria/blob/main/lib/astaria-gpl/src/AuctionHouse.sol#L195
- https://github.com/sherlock-audit/2022-10-astaria/blob/main/src/AstariaRouter.sol#L381
- https://github.com/sherlock-audit/2022-10-astaria/blob/main/src/LienToken.sol#L613
Tool used
Manual Review
Recommendation
- Maintain a mapping of active public vaults.
- Account for malicious lien token owners via lien buyouts.
- Use reentrancy guards.
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
Likely the protocol trusts and calls supportsInterface() on a buyer-supplied contract without handling reverts, so a malicious implementation can halt core flows.
Impact
The attacker can block collateral release, prevent liquidation from starting and stop lien payments, causing fund loss or lock for other lien holders and the borrower's collateral.
What the attacker needed
Ability to call buyoutLien; attacker-controlled contract as receiver
The fix
The protocol should account for malicious lien token owners during buyouts and use reentrancy guards, and it should not let a buyer-controlled contract halt core flows.
How it was found
- Call buyoutLien to purchase a small lien amount with the token delivered to an attacker-controlled contract.
- Implement supportsInterface() in that contract so it reverts.
- Trigger protocol actions that call supportsInterface() on the lien owner, such as endAuction(), liquidate() or makePayment().
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.
A lien is a claim on a borrower's collateral held by whoever bought it. The protocol asks the buyer's contract a standard question (supportsInterface) to check what it supports, and the attacker's contract answers by crashing on purpose. That crash stops important actions like paying out or liquidating, so other people's money and collateral get stuck.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.