Skip to content
DoS Audit finding Intermediate

Forced buyouts can be performed by malicious buyers

A malicious proposer can start a buyout using a contract that cannot receive ERC1155 tokens. If the buyout fails, the end function reverts when trying to send tokens back, preventing any new buyout from starting.

cccz Follow

Originally disclosed on Code4rena

Submitted by cccz

In the end function of the Buyout contract, when the buyout fails, ERC1155 tokens are sent to the proposer. A malicious proposer can start a buyout using a contract that cannot receive ERC1155 tokens, and if the buyout fails, the end function fails because it cannot send ERC1155 tokens to the proposer. This prevents a new buyout from being started.

Proof of Concept

https://github.com/code-423n4/2022-07-fractional/blob/8f2697ae727c60c93ea47276f8fa128369abfe51/src/modules/Buyout.sol#L224-L238

Recommended Mitigation Steps

Consider saving the status of the proposer after a failed buyout and implementing functions to allow the proposer to withdraw the ERC1155 tokens and eth.

Ferret-san (Fractional) confirmed

HardlyDifficult (judge) commented:

The 1155 receiver can prevent a failed buyout from ending, which prevents a new one from starting. Agree with severity.


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

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 end function sends ERC1155 tokens to the proposer without handling the case where the proposer cannot receive them, causing a revert that blocks future buyouts.

Impact

A malicious proposer can permanently block new buyouts from being started, causing a denial of service.

What the attacker needed

Attacker can start a buyout; attacker uses a contract that rejects ERC1155

The fix

The contract should save the proposer's status after a failed buyout and provide a function for the proposer to withdraw the ERC1155 tokens and ETH.

How it was found

  1. A malicious proposer starts a buyout using a contract that cannot receive ERC1155 tokens.
  2. The buyout fails.
  3. The end function tries to send ERC1155 tokens to the proposer and reverts.
  4. No new buyout can be started.

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 buyout is a process where someone offers to buy all shares of a fractionally owned item. If the buyout fails, the system tries to return some tokens to the person who started it. But if that person is a contract that refuses to accept tokens, the return fails and the whole buyout process gets stuck, blocking anyone else from trying again.

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 cccz

View all

104 more disclosed reports, best first.

More from Fractional v2 contest

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.