Attackathon _ Fuel Network 33295 - [Smart Contract - Low] Bug in array decoding can lead to critical
Description
Brief/Intro
Vulnerability Details
impl<T> AbiDecode for [T; 3]
where
T: AbiDecode,
{
fn abi_decode(ref mut buffer: BufferReader) -> [T; 3] {
let first: T = buffer.decode::<T>();
let mut array = [first; 3];
let mut i = 1;
while i < 3 {
array[i] = buffer.decode::<T>();
i += 1;
}
array
}
}
Impact Details
References
Proof of concept
Proof of Concept
PreviousAttackathon _ Fuel Network 33286 - [Smart Contract - Insight] panic on unwrapping in type_check_traiNextAttackathon _ Fuel Network 33302 - [Smart Contract - Medium] Exp function does not work correctly
Last updated
Was this helpful?