QA Report #178
Labels
bug
Something isn't working
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Missing validation for the return value of the price oracle
Lines of code
https://github.com/code-423n4/2022-06-connext/blob/main/contracts/contracts/core/connext/helpers/ConnextPriceOracle.sol#L125
Vulnerability details
Impact
Tprice feed must be checked if the data is really updated or not.
Proof of Concept
https://github.com/code-423n4/2022-06-connext/blob/main/contracts/contracts/core/connext/helpers/ConnextPriceOracle.sol#L125
Tools Used
code review
Recommended Mitigation Steps
Add the following validations.
(uint80 roundId, uint256 answer, , uint256 updatedAt, uint80 answeredInRound) = oracle.latestRoundData();
require(answeredInRound >= roundId, "error message");
require(updatedAt > 0, "error message");
The text was updated successfully, but these errors were encountered: