4 ms·
The point of the byte code being safe is that no operations performed by WASM code could cause a memory unsafety bug from the perspective outside the sandbox. I
by connicpu 7y ago
The point of the byte code being safe is that no operations performed by WASM code could cause a memory unsafety bug from the perspective outside the sandbox. If your code violates its own memory rules then it will only mess up the logical state of its VM memory chunk, and probably produce an incorrect result. The same thing can happen in any safe language if you access the wrong indexes in an array because of a logical error in your code
- pjmlp 7y agoThat incorrect results might lead to security exploits, the same way that browsers now get exploited by taking advantage how their VMs work. So hand waving such security issues is rather strange, when it should be the top concern when selling an infrastructure to run code from unknown sources.
- afiori 7y ago> the same way that browsers now get exploited by taking advantage how their VMs work The difference is if the exploit is run by the browser or the VM. If the VM has a logic error, gives back the wrong result, the browser decides to trust the result and be exploited then it is a browser bug; not a sandbox issue. The other situation is when a browser spins up a VM to add 2 and 2 but then the VM starts downloading malicious files from the internet. No kind of safe language can avoid the first class, wasm avoids the second.