Attackathon _ Fuel Network 33401 - [Smart Contract - Insight] insight compiler crash - trait dummy m

Submitted on Fri Jul 19 2024 13:27:40 GMT-0400 (Atlantic Standard Time) by @cyberthirst for Attackathon | Fuel Networkarrow-up-right

Report ID: #33401

Report type: Smart Contract

Report severity: Insight

Target: https://github.com/FuelLabs/sway/tree/v0.61.2

Impacts:

  • Compiler bug

Description

Brief/Intro

Certain classes of contracts utilizing abi_decode crash the compiler.

Vulnerability Details

The compiler crashes with the following message:

2527 | pub trait AbiDecode {
2528 |     fn abi_decode(ref mut buffer: BufferReader) -> Self;
     |        ^^^^^^^^^^ Internal compiler error: Method abi_decode_37 is a trait method dummy and was not properly replaced.
Please file an issue on the repository and include the code that triggered this error.
2529 | }
     |

Impact Details

Certain classes of programs are not possible to compile due to a compiler bug.

Proof of concept

Proof of Concept

src/main.sw

forc.toml:

Last updated

Was this helpful?