Causing network processing nodes to process transactions from the mempool beyond set parameters (e.g. prevents processing transactions from the mempool)
Description
Brief/Intro
The fuel_gas_price_algorithm::AlgorithmV1calculate function may panic if it is not initialized correctly. This would result in the halting of nodes on mainnet and would stop the network from working correctly.
Vulnerability Details
The is currently unused but would be used to determine the price of the current gas price on Fuel. It is featuring a PID controller (without the I component though) that takes in the block profit target and adjust the P (proportional) and D (derivative) parameters in order to tend to reach it. There is a bug though that gets triggered when the function is called. It triggers a panic with the message "attempt to negate with overflow". This will panic whenever because -i64::MIN is undefined on the range of the integers.
This has been found with fuzzing, with the following input:
The AlgorithmV1 does not seem to be used right now, but if it is and that the parameters are not checked correctly, it will panic on mainnet and halt all of the nodes of the network since they should agree on the same parameters.