PeggyJV / gravity-bridge

A CosmosSDK application for moving assets on and off of EVM based, POW chains
Apache License 2.0
57 stars 58 forks source link

Computational load attacks via Num256 parsing #263

Open hannydevelop opened 3 years ago

hannydevelop commented 3 years ago

Original Isuue

Surfaced from @informalsystems audit of Althea Gravity Bridge at commit 19a4cfe

severity: High type: Implementation bug difficulty: Unknown

Involved artifacts

tony-iqlusion commented 3 years ago

FYI, I've been working with the ethers-rs people to make crypto-bigint suitable for Ethereum use cases. It provides actually-fixed-width stack-allocated integers, including a U256 type:

https://docs.rs/crypto-bigint/

Ethereum-wise it supports RLP via an off-by-default rlp feature which uses the rlp crate.