You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.
sherlock-admin opened this issue
Jun 11, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
No check if Chainlink's function .latestsRoundData returns stale prices.
Summary
When a Chainlink aggregtor is used for getting a price using latestRoundData the return values are not check so they can be stale prices.
Vulnerability Detail
The PriceOracles.sol contract implement several functions does call to the latestsRoundData provided by Chainlink. The functions where latestsRoundData is called are getPriceFromChainlink and _setAggregators. Once the values are returned, the only check done is require(price > 0, "invalid price");. However this check does not guarantee that the returned price is not an stale price.
I am adding some other sources where this vulnerability is described:
The returned prices can be stale prices, this means that the prices uses for the protocol may not be the correct ones. These values that are returned must pass additional checks before proceeding with price updates. If you only receive the price without considering these values, there is a possibility of encountering outdated prices and incomplete data rounds.
sherlock-admin2
added
Medium
A valid Medium severity issue
Duplicate
A valid issue that is a duplicate of an issue with `Has Duplicates` label
Reward
A payout will be made for this issue
and removed
Non-Reward
This issue will not receive a payout
labels
Jul 19, 2023
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
devScrooge
medium
No check if Chainlink's function
.latestsRoundData
returns stale prices.Summary
When a Chainlink aggregtor is used for getting a price using
latestRoundData
the return values are not check so they can be stale prices.Vulnerability Detail
The
PriceOracles.sol
contract implement several functions does call to thelatestsRoundData
provided by Chainlink. The functions wherelatestsRoundData
is called are getPriceFromChainlink and _setAggregators. Once the values are returned, the only check done isrequire(price > 0, "invalid price");
. However this check does not guarantee that the returned price is not an stale price.I am adding some other sources where this vulnerability is described:
Impact
The returned prices can be stale prices, this means that the prices uses for the protocol may not be the correct ones. These values that are returned must pass additional checks before proceeding with price updates. If you only receive the price without considering these values, there is a possibility of encountering outdated prices and incomplete data rounds.
Code Snippet
https://github.com/sherlock-audit/2023-05-ironbank/blob/main/ib-v2/src/protocol/oracle/PriceOracle.sol#L107
https://github.com/sherlock-audit/2023-05-ironbank/blob/main/ib-v2/src/protocol/oracle/PriceOracle.sol#L67
Tool used
Manual Review
Recommendation
Duplicate of #9
The text was updated successfully, but these errors were encountered: