2 ms·
> the only reliable solution is security through compartmentalization I hope we get there eventually. Not just for standalone processes, but for individual lib
by JoshTriplett 3y ago
> the only reliable solution is security through compartmentalization
I hope we get there eventually. Not just for standalone processes, but for individual libraries. A decompression library could run inside a WebAssembly sandbox, with the compressed file as input, the uncompressed file as output, and no other capabilities.
- funcDropShadow 3y agoWhat does this have to do with WebAssembly? That is another runtime that adds complexity. Apple has been sandboxing codecs for a long time. They run in a sandboxed process that is only communicating through stdin and stdout or something similar, if I remember correctly. You can ran native code directly. Adding a runtime with a JIT-compiler makes it harder to understand what is going on.
- 01HNNWZ0MV43FF 3y agoThere's AOT wasm too. Firefox uses it to sandbox some stuff. https://hacks.mozilla.org/2021/12/webassembly-and-back-again-fine-grained-sandboxing-in-firefox-95/ https://hacks.mozilla.org/2021/12/webassembly-and-back-again...
- JoshTriplett 3y agoWebAssembly can be run in-process rather than requiring a process switch, and it can be easier to port library code to run inside a WebAssembly sandbox than a completely separate process. Also, sandbox mechanisms for separate processes are not always as robust, since they have to give access to any direct syscalls the process makes, whereas WebAssembly completely insulates a library from any native surface area.
- nottorp 3y agoWebAssembly is the new Rust, I think Hey, no one proposed to rewrite xz in Rust yet! I'm sure that would automatically protect any project from social engineering attacks!
- joeyh 3y agoRunning xz in a sandbox would not prevent an attack that causes it to modify source code in a .tar.xz that is being streamed through it.
- JoshTriplett 3y agoNo, it wouldn't, but that wasn't the attack here. And code outside the sandbox could check a checksum of the uncompressed data, to ensure that the decompression can't misbehave.