4 ms·
WASM gives you a linear memory block and performs only bounds checking. It provides very few higher-order abstractions. For example, the way you allocate memor
by ridiculous_fish 9y ago
WASM gives you a linear memory block and performs only bounds checking. It provides very few higher-order abstractions.
For example, the way you allocate memory in WASM is to link in a malloc() implementation. This malloc lives in the same linear memory block, and so its internal data structures are vulnerable to being smashed, just like classical heap smashing.
One improvement is that the call stack is maintained externally, so it is not possible to stack-smash a return address. Still heap function pointers are vulnerable to a return-to-libc style attack.
Round and round we go.