FuelLabs / fuel-vm

Fuel v2 interpreter in Rust
Other
358 stars 88 forks source link

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

Closed xgreenx closed 4 months ago

xgreenx commented 4 months 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