aurora-is-near / aurora-engine

⚙️ Aurora Engine implements an Ethereum Virtual Machine (EVM) on the NEAR Protocol.
https://doc.aurora.dev/develop/compat/evm
330 stars 82 forks source link

fix: reachable panic due to out-of-memory in `modexp` precompile #689

Closed 0x3bfc closed 1 year ago

0x3bfc commented 1 year ago

Description

The precompile may panic if the exponent length is greater than the allocable space when calling parse_bytes() to retrieve the exponent length from the input. To trigger this panic the base length and modulus length must be zero due to gas requirements.

Aurora-ClickUp commented 1 year ago

Task linked: CU-863g0ge8z AUR-07 Reachable Panic Due to Out-of-Memory