3 ms·
> which is no more at risk of buffer overflow attacks than vanilla javascript. This is quite wrong, a Wasm program can overflow internal buffers due to a missi
by zozbot234 5y ago
> which is no more at risk of buffer overflow attacks than vanilla javascript.
This is quite wrong, a Wasm program can overflow internal buffers due to a missing bounds check and access unrelated data as a result. See HEARTBLEED for a case where this created a very real vulnerability. The Wasm safe sandbox only protects the boundary with the rest of the system.
- azakai 5y agoYou're right that wasm programs can overflow internal buffers in linear memory, which can be dangerous. However, wasm does a lot more than only protect the boundary with the rest of the system, including * Safe call stack (opaque / managed by the VM, and so uncorruptible). * Safe control flow (no jumps to unexpected places). * Safe(r) indirect calls (only methods in the table can be called, and the signature is verified). However, wasm also lacks a few things, like the ability to write-protect static data (see "Everything Old is New Again: Binary Security of WebAssembly"). Future wasm proposals will hopefully address those things.