Skip to content
DoS Audit finding Intermediate

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.

0xRajeev Follow

Originally disclosed on Sherlock

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

  1. An attacker can revert endAuction() to prevent the release of collateral to the winner.
  2. An attacker can revert liquidate() to prevent the liquidation from even starting.
  3. An attacker can revert _payment() to prevent any lien payments from succeeding in calls to makePayment(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

  1. https://github.com/sherlock-audit/2022-10-astaria/blob/main/lib/astaria-gpl/src/AuctionHouse.sol#L195
  2. https://github.com/sherlock-audit/2022-10-astaria/blob/main/src/AstariaRouter.sol#L381
  3. https://github.com/sherlock-audit/2022-10-astaria/blob/main/src/LienToken.sol#L613

Tool used

Manual Review

Recommendation

  1. Maintain a mapping of active public vaults.
  2. Account for malicious lien token owners via lien buyouts.
  3. Use reentrancy guards.

The original report as published on Sherlock, by 0xRajeev. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

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

  1. Call buyoutLien to purchase a small lien amount with the token delivered to an attacker-controlled contract.
  2. Implement supportsInterface() in that contract so it reverts.
  3. 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.

More by 0xRajeev

View all

61 more disclosed reports, best first.

More from Astaria

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.