3 ms·
I would argue that attacks like this https://blog.golemproject.net/how-to-find-10m-by-just-reading-blockchain-6ae9d39fcd95 https://blog.golemproject.net/how-to-
by kevingadd 9y ago
I would argue that attacks like this https://blog.golemproject.net/how-to-find-10m-by-just-reading-blockchain-6ae9d39fcd95 https://blog.golemproject.net/how-to-find-10m-by-just-readin... are only possible due to the lack of attention paid to safety in the design of EVM. You can compensate for it by putting more smarts into Solidity and other compilers but the basic fact is that the VM doesn't do much to prevent it. Other modern (and even non-modern) VMs take steps to prevent this without reducing expressiveness or speed at all.
At a fundamental level, getting 0s when reading missing or out-of-bounds values is an incredible red flag for security-focused design. Incidentally I can't even find a concrete source that says how calldataload behaves when an index is out of bounds. It's not mentioned anywhere in the documentation I've found (on the ethereum website or elsewhere).