Closed 0x34d closed 1 year ago
And also why crash in an EVM
is not a problem?
You Don't read
@0x34d Thanks for your report.
DecodeResultData
, it seems RPC will use it.DecodeResultData
be called. I found when the panic occurs the response will be call to MyToken.decimals errored: Returned error: {"jsonrpc":"2.0","error":"method handler crashed","id":2914840410484372}
but the node runs allright. so I think It will NOT cause a DOS?I deploy a local net which will always panic when the DecodeResultData be called. I found when the panic occurs the response will be call to MyToken.decimals errored: Returned error: {"jsonrpc":"2.0","error":"method handler crashed","id":2914840410484372} but the node runs allright. so I think It will NOT cause a DOS?
It won't; they are both technically different.
When DecodeResultData
is called by a network, there will be some prefix data, Fuzzing like this is a headache.
probably DecodeResultData
is not even called with the same data in node.
as you have reported to hackenproof. How it will be fixed? Is there any sugguestions? Many thanks!
something like this.
x/evm/types/utils.go:248
case 9:
//check if data is not nill
if dataLen == 0 {
return nil, fmt.Errorf("invalid removed flag length: %d", dataLen)
}
Or maybe you have a crash handler deployed to recover after a crash.
That's how it should be; every major network application recovers after a crash, even those that are written in C.
while true; do
echo "This will run forever until you manually stop it."
./RunMyserver 8080
done
Now you can recover after a crash. There is no such thing as a crash.
Summary of Bug
Backtrace :
Steps to Reproduce
file : exchain/x/evm/types/utils_test.go
run:
go test -run TestDecodeResultData $(pwd)/x/evm/types
Impact
Crash over aka DOS on the network.
Note: