News for hackers. Stuff that matters.
Re:WebAssembly from Scratch: From FizzBuzz to DooM by pjmlp on Wednesday July 14, 2021 @11:30AM (#27834213)
Unfortunely that is not what WASM designers decided when they went without memory tagging for linear memory segments.

So you get all the fun to corrupt linear memory C style.

Re:WebAssembly from Scratch: From FizzBuzz to DooM by flohofwoe on Wednesday July 14, 2021 @12:38PM (#27835045)
I think if you're afraid of memory corruption inside the WASM heap, it's better to use Rust instead of C or C++. WASM's job is to prevent code inside the sandbox from escaping the sandbox, not to prevent memory corruption inside the sandbox.
Re:WebAssembly from Scratch: From FizzBuzz to DooM by pjmlp on Wednesday July 14, 2021 @01:45PM (#27835894)
> I think if you're afraid of memory corruption inside the WASM heap, it's better to use Rust instead of C or C++.

Agreed, but as consumer from WASM modules that isn't your option to make.

> WASM's job is to prevent code inside the sandbox from escaping the sandbox, not to prevent memory corruption inside the sandbox.

That is not better than a typical OS process, just it happens to be randomly downloaded into my computer.

Re:WebAssembly from Scratch: From FizzBuzz to DooM by afiori on Thursday July 15, 2021 @08:03PM (#27851615)
It is a lot better: there is a sandbox with minimal surface area compared to no sandbox at all (except for memory isolation)
Re:WebAssembly from Scratch: From FizzBuzz to DooM by pjmlp on Friday July 16, 2021 @02:34AM (#27853559)
When they are finished with the WebAssembly roadmap there will be the same sandbox as a typical OS process, no different of running a ART executable on Android, bitcode on watchOS, MSIL on Windows, or TIMI on IBM i.
Re:WebAssembly from Scratch: From FizzBuzz to DooM by afiori on Friday July 16, 2021 @08:06AM (#27855425)
Of course, that is the plan, but even then it will still be possible to run WebAssebly modules with no permissions or limited permissions, as the sandbox was always there.

On the other hand I need to admit that I would have not forseen some of the more recent use cases for WebAssembly

https://bytecodealliance.org/articles/making-javascript-run-...

which can be reminescent of the "docker daemon running as root" issue.