priceFeed1 in pegOracle is not checked for sanity #131
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate
This issue or pull request already exists
old-submission-method
partial-25
Incomplete articulation of vulnerability; eligible for partial credit only (25%)
resolved
Finding has been patched by sponsor (sponsor pls link to PR containing fix)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Lines of code
https://github.com/code-423n4/2022-09-y2k-finance/blob/2175c044af98509261e4147edeb48e1036773771/src/oracles/PegOracle.sol#L63
Vulnerability details
Impact
priceFeed1 is called directly, instead of through getOracle1_Price, thus missing assurance checks. for example, price1<=0 is not reverted. This may result in unexpected behavior.
Proof of Concept
https://github.com/code-423n4/2022-09-y2k-finance/blob/2175c044af98509261e4147edeb48e1036773771/src/oracles/PegOracle.sol#L63
Tools Used
Recommended Mitigation Steps
getOracle_Price(uint256 oracleIndex)
getOracle_Price(uint256 oracleIndex) returns (uint80 roundID, int256 price, uint256 timeStamp, uint80 answeredInRound)
The text was updated successfully, but these errors were encountered: