Re:size_t-to-int vulnerability in Linux’s filesystem layer
by mgraczyk on Tuesday July 20, 2021 @02:59PM
(#27897745)
The Ethereum virtual machine addresses it's storage with 256 bits, so there's one wild example. Although in this case you'd probably not want to use usize directly to represent storage.
[ Parent
| on HN ]
Re:size_t-to-int vulnerability in Linux’s filesystem layer
by eloff on Tuesday July 20, 2021 @03:09PM
(#27897890)
I'm not familiar with the Ethereum virtual machine, are these really memory pointers? Surely it's represented differently?
Re:size_t-to-int vulnerability in Linux’s filesystem layer
by mgraczyk on Tuesday July 20, 2021 @03:59PM
(#27898501)
EVM is a stack machine, and it has durable storage which is addressed using 256 bit "pointers". So you can do something like
push x // 256 bit constant
LOAD
// top of stack now contains storage[x]