Attackathon _ Fuel Network 32696 - [Smart Contract - High] incorrect setting of non_negative value i
Description
Brief/Intro
Vulnerability Details
pub fn ceil(self) -> Self {
let mut underlying = self.underlying;
let mut non_negative = self.non_negative;
if self.non_negative {
underlying = self.underlying.ceil();
} else {
let ceil = self.underlying.ceil();
if ceil != self.underlying {
underlying = ceil + UFP64::from(1);
if ceil == UFP64::from(1) {
non_negative = true; // in this situation non negative should be true
}
} else {
underlying = ceil;
}
}
Self {
underlying: underlying,
non_negative: self.non_negative,// but we set the self.non_negative which is not the updated value above (shown in POC)
}
}
}
Impact Details
References
Proof of concept
Proof of Concept
PreviousAttackathon _ Fuel Network 32695 - [Blockchain_DLT - Insight] increasing processing for public nodesNextAttackathon _ Fuel Network 32700 - [Smart Contract - High] double increasing underlying value in cei
Last updated
Was this helpful?