LooksRare Aggregator contest - SamGMK's results

An NFT aggregator protocol.

General Information

Platform: Code4rena

Start Date: 08/11/2022

Pot Size: $60,500 USDC

Total HM: 6

Participants: 72

Period: 5 days

Judge: Picodes

Total Solo HM: 2

Id: 178

League: ETH

LooksRare

Findings Distribution

Researcher Performance

Rank: 69/72

Findings: 1

Award: $36.34

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2022-11-looksrare/blob/e3b2c053f722b0ca2dce3a3eb06f64859b8b7a6f/contracts/LooksRareAggregator.sol#L44

Vulnerability details

##Impact

A malicious (or malfunctioning) proxy contract with the same or overlapping storage layout as LooksRareAggregator can manipulate the erc20EnabledLooksRareAggregator address and set a malicious address therefore able to steal users' erc20 funds as approval is granted.

Proof of Concept

The erc20EnabledLooksRareAggregator address is set as a state variable in LooksRareAggregator contract. There is no protection against it being changed by a proxy with the same storage layout.

Tools Used

Manual auditing

Save erc20EnabledLooksRareAggregator address in memory before delegatecall as this will not be affected

address erc20EnabledLooksRareAggregator_ = erc20EnabledLooksRareAggregator

Then check whether erc20EnabledLooksRareAggregator has not been changed after the external call

if( erc20EnabledLooksRareAggregator_ != erc20EnabledLooksRareAggregator) { revert() }

#0 - c4-judge

2022-11-19T10:29:51Z

Picodes marked the issue as duplicate of #125

#1 - c4-judge

2022-12-16T13:50:16Z

Picodes marked the issue as not a duplicate

#2 - c4-judge

2022-12-16T13:50:23Z

Picodes changed the severity to QA (Quality Assurance)

#3 - c4-judge

2022-12-16T13:50:47Z

Picodes marked the issue as grade-b

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter