Open zlsecure3 opened 1 year ago
submission_id:1756996825
review_type:GRADING
result: TBD-yes,no
rating: TBD-123
comment: TBD-Rejected,Accepted by Secure3.
severity: TBD-Critical,Medium,Low,Informational
category:
description:
submission_id:1756996825
review_type:CLIENT_FEEDBACK
result: TBD-yes,no
severity: TBD-Critical,Medium,Low,Informational
comment:
submission_id:1756996825
review_type:CLIENT_FEEDBACK_DECISION
result: TBD-yes,no,yes-honored,no-honored
severity: TBD-Critical,Medium,Low,Informational
comment:
subject
should assert
vars.defaultOraclePrice
is not negative inPriceOracle::_getPriceFeed(uint256 assetId)
functiondescription
It's possible that
latestRoundData()
returns a negative price when things go wrong, as its type isint
instead ofuint
.Should assert the returned price is not negative to be safe, otherwise when a negative integer is returned,uint256(vars.defaultOraclePrice)
will be extremely big.recommendation
Add an assertion that
vars.defaultOraclePrice
is not negative after L159 .locations
severity
Low
damage
exploitability
category
Integer Overflow and Underflow
system_generated: auditor:alansh submission_id:1756996825