Attackathon _ Fuel Network 32673 - [Smart Contract - Low] Missing array length check for non constan
Description
Brief/Intro
Vulnerability Details
if let Ok(Constant {
value: ConstantValue::Uint(constant_value),
..
}) = compile_constant_expression_to_constant(
self.engines,
context,
md_mgr,
self.module,
None,
Some(self),
index_expr,
) {
let count = array_type.get_array_len(context).unwrap();
if constant_value >= count {
return Err(CompileError::ArrayOutOfBounds {
index: constant_value,
count,
span: index_expr_span,
});
}
} Impact Details
References
Proof of concept
Proof of Concept
PreviousAttackathon _ Fuel Network 32628 - [Blockchain_DLT - Medium] A GraphQL query crashes core processNextAttackathon _ Fuel Network 32695 - [Blockchain_DLT - Insight] increasing processing for public nodes
Last updated
Was this helpful?