Lucene search

K
code423n4Code4renaCODE423N4:2022-11-LOOKSRARE-FINDINGS-ISSUES-270
HistoryNov 13, 2022 - 12:00 a.m.

The owner of the contract can broke the storage of the LooksRareAggregator contract

2022-11-1300:00:00
Code4rena
github.com
6
looksrareaggregator
storage manipulation
contract owner
addfunction()
delegatecall
recommended mitigation steps
proxies management

Lines of code
<https://github.com/code-423n4/2022-11-looksrare/blob/main/contracts/LooksRareAggregator.sol#L88&gt;

Vulnerability details

Impact

The owner of the contract can broke the storage of the LooksRareAggregator contract

Proof of Concept

The addFunction() function - <https://github.com/code-423n4/2022-11-looksrare/blob/e3b2c053f722b0ca2dce3a3eb06f64859b8b7a6f/contracts/LooksRareAggregator.sol#L132&gt; can be called by the owner to to set proxy address and function selector for the function to be called inside this proxy. This function is dangerous because LooksRareAggregator performs delegatecall - <https://github.com/code-423n4/2022-11-looksrare/blob/main/contracts/LooksRareAggregator.sol#L88&gt; to that address. It is not guaranteed that those new proxies won’t rewrite slots in the LooksRareAggregator storage.

Recommended Mitigation Steps

Consider following well-known patterns for proxies management.


The text was updated successfully, but these errors were encountered:

All reactions