Attackathon _ Fuel Network 33140 - [Smart Contract - Insight] Sway compiler crash when compile malic
Description
Brief/Intro
Vulnerability Details
fn const_eval_codeblock(
lookup: &mut LookupEnv,
known_consts: &mut MappedStack<Ident, Constant>,
codeblock: &ty::TyCodeBlock,
) -> Result<Option<Constant>, ConstEvalError> {
// the current result
let mut result: Result<Option<Constant>, ConstEvalError> = Ok(None);
// keep track of new bindings for this codeblock
let mut bindings: Vec<_> = vec![];
for ast_node in &codeblock.contents {
result = match &ast_node.content {
...
ty::TyAstNodeContent::Error(_, _) => {
unreachable!("error node found when generating IR"); // [1] unhandled error cause unreachable panic
}
};
...
Impact Details
References
Proof of concept
Proof of Concept
PreviousAttackathon _ Fuel Network 33139 - [Smart Contract - Insight] Unreachable panic in sway compiler wheNextAttackathon _ Fuel Network 33168 - [Smart Contract - High] Incorrect Sign Determination In Multiply
Last updated
Was this helpful?