Skip to content

Conversation

@sorpaas
Copy link
Member

@sorpaas sorpaas commented Aug 15, 2022

Our current code in parsing the EVM revert reason is incorrect in two ways. First, the length is a big-endian encoded U256, not a simple sum. Second, the current summing function uses the accumulator type of u8 which will overflow easily. The current code only works because most EVM revert reasons are not larger than 256 bytes.

@sorpaas sorpaas merged commit fff8cc4 into master Aug 15, 2022
@sorpaas sorpaas deleted the sp-fix-overflow-rpc-revert-reason branch August 15, 2022 13:01
boundless-forest pushed a commit to darwinia-network/frontier that referenced this pull request Aug 15, 2022
…vm#820)

* Fix length checking overflow in EVM revert reason parsing

* Remove unused debug_assert
nanocryk pushed a commit to moonbeam-foundation/frontier that referenced this pull request Aug 16, 2022
…vm#820)

* Fix length checking overflow in EVM revert reason parsing

* Remove unused debug_assert
abhijeetbhagat pushed a commit to web3labs/frontier that referenced this pull request Jan 11, 2023
…vm#820)

* Fix length checking overflow in EVM revert reason parsing

* Remove unused debug_assert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants