You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We received a report from an external researcher highlighting an issue with the CheckTxFee function in the ZetaChain node. The report indicates that the function does not handle nil values for the gasPrice parameter, which could result in a runtime panic.
Description
The CheckTxFee function in the rpc/types/utils.go file does not check if the gasPrice parameter is nil. This can lead to a runtime panic when the function attempts to call the Mul method on gasPrice.
Adding an additional validation check for gasPrice within the CheckTxFee function is recommended as a defensive programming measure. However, we believe the overall impact is negligible since no other state confusion or side effects were observed in the reported scenario.
Request for Further Validation
Per feedback from @lumtis, further investigation is required to:
Confirm the absence of other side effects.
Validate the negligible impact assessment.
The text was updated successfully, but these errors were encountered:
Background
We received a report from an external researcher highlighting an issue with the
CheckTxFee
function in the ZetaChain node. The report indicates that the function does not handlenil
values for thegasPrice
parameter, which could result in a runtime panic.Description
The
CheckTxFee
function in therpc/types/utils.go
file does not check if thegasPrice
parameter isnil
. This can lead to a runtime panic when the function attempts to call theMul
method ongasPrice
.Relevant Code:
Impact
This issue can cause the application to crash unexpectedly, resulting in:
Steps to Reproduce
CheckTxFee
function with anil
value forgasPrice
.gasPrice.Mul()
.Recommendation
Add a
nil
check for thegasPrice
parameter within theCheckTxFee
function to prevent the runtime panic:Internal Analysis
Analysis by @0xM3R:
When tracing the function call, it was found that
gasPrice
is checked against beingnil
in thecall_tx
module:Adding an additional validation check for
gasPrice
within theCheckTxFee
function is recommended as a defensive programming measure. However, we believe the overall impact is negligible since no other state confusion or side effects were observed in the reported scenario.Request for Further Validation
Per feedback from @lumtis, further investigation is required to:
The text was updated successfully, but these errors were encountered: