FuelLabs / fuel-vm

Fuel v2 interpreter in Rust
Other
344 stars 77 forks source link

Fixed the CCP opcode to charge for the length of the input #786

Closed xgreenx closed 6 days ago

xgreenx commented 1 week ago

The attacker can manipulate input length and contract_len(by deploying the corresponding contract) and cause memory clear or contract and to be cheap.

We need to charge for the maximum possible value. It will incentivize the caller of the CPP to use the same length and contract_len.

Before requesting review