Re:The Bytecode Alliance: Building a secure, composable futu...
by afiori on Thursday November 14, 2019 @01:53AM
(#21533357)
The point is that you can more easily and clearly sandbox the wasm plugin. If the python implementation tries to send http requests but the wasm sandbox has no network access you are safer in wasm than in python.
Re:The Bytecode Alliance: Building a secure, composable futu...
by danudey on Tuesday November 26, 2019 @08:35PM
(#21644546)
Unless you choose to sandbox your python. Obviously the language itself doesn't support this, but most OSes have functionality for this that can be applied to any application or code, not just wasm.
Re:The Bytecode Alliance: Building a secure, composable futu...
by vanderZwan on Wednesday November 13, 2019 @04:20AM
(#21522342)
Does WASM let you run memory as code?
Re:The Bytecode Alliance: Building a secure, composable futu...
by thekingofh on Wednesday November 13, 2019 @04:54PM
(#21530030)
No. Marking memory as executable is a native machine level capability (as in x86_64 assembly machine instructions). Wasm is a stack machine interpreter that can read only Wasm binaries. The binary format is essentially just a compressed/minimized form of the bytecode format, which used to essentially be an AST of the original source code, but now I believe they modified it a bit to be more analogous to hypothetical machine code, but still abstracted. The Wasm interpreter does not understand x86 or ARM or whatever machine code it's fed it and rightly so. If that was possible, anyone could just send over a buffer to the browser to execute whatever they want.
Re:The Bytecode Alliance: Building a secure, composable futu...
by vanderZwan on Thursday November 14, 2019 @04:56AM
(#21534209)
That's what I thought. Then that's one whole category of exploits that no longer applies, no?
Re:The Bytecode Alliance: Building a secure, composable futu...
by thekingofh on Thursday November 14, 2019 @11:38AM
(#21536821)
Yes, assuming there's no flaws in the interpreter. But they're all moving full steam ahead in the browsers right now, so imagine it's deemed as safe as javascript. The current push is to divvy up the permissions of certain resources such as sockets and filesystem (browser code don't have filesystem access) and make an API to ensure that modules don't overstep their granted permissions. It'll probably look a lot like node and npm, where you could add a module to your source and know that it can't access things it shouldn't. Pretty exciting stuff. It's a true merger of all languages together under one runtime.
Re:The Bytecode Alliance: Building a secure, composable futu...
by rkangel on Friday November 15, 2019 @11:20AM
(#21546078)
That's true, but that's a class of exploits that is mostly impossible anyway (except in an embedded environment). Most systems that have an MMU ensure that no page is both writeable and executable, meaning you can't inject code. This forces attackers to use ROP.
As in, if you write your program in c, python, whatever, and put it in wasm, then have a wasm extension system of some sort - if that c or python is exploitable, then whatever external access that wasm instance has is now useable. And whatever memory is in the memory space can be modified.
This is an important distinction. Wasm should be thought of as a tool to containerise execution and memory if the implimentation is proven to do so.