This repository has been archived by the owner on Jan 7, 2024. It is now read-only.
bin2chen - setSymbolsPrice() can use the priceSig from a long time ago #113
Labels
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
High
A valid High severity issue
Reward
A payout will be made for this issue
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Will Fix
The sponsor confirmed this issue will be fixed
bin2chen
high
setSymbolsPrice() can use the priceSig from a long time ago
Summary
setSymbolsPrice()
only restricts the maximum value ofpriceSig.timestamp
, but not the minimum timeThis allows a malicious user to choose a malicious
priceSig
from a long time agoA malicious
priceSig.upnl
can seriously harmpartyB
Vulnerability Detail
setSymbolsPrice()
only restricts the maximum value ofpriceSig.timestamp
, but not the minimum timeLibMuon.verifyPrices only check sign, without check the time range
In this case, a malicious user may pick any
priceSig
from a long time ago, and thispriceSig
may have a large negativeunpl
, leading toLiquidationType.OVERDUE
, severely damagingpartyB
We need to restrict
priceSig.timestamp
to be no smaller thanmaLayout.liquidationTimestamp[partyA]
to avoid this problemImpact
Maliciously choosing the illegal
PriceSig
thus may hurt others userCode Snippet
https://github.com/sherlock-audit/2023-06-symmetrical/blob/main/symmio-core/contracts/facets/liquidation/LiquidationFacetImpl.sol#L34-L44
Tool used
Manual Review
Recommendation
restrict
priceSig.timestamp
to be no smaller thanmaLayout.liquidationTimestamp[partyA]
The text was updated successfully, but these errors were encountered: