[1]: https://kripken.github.io/blog/wasm/2020/07/27/wasmboxc.html...
Take signed int overflow on addition. On some platforms ADD wraps, on others it traps. Depending on target CPU you'll get very different behavior even for non-optimizing compilers that just emit an ADD instruction!
WASM is just another target, with its own behavior.
Unless the produced C code is validated against optimizations across every single compiler version, there are no guarantees of that actually being the case.
Isn't the point that you don't care?
Each untrusted library is compiled to wasm then C then native, they can corrupt their own datastructures but the point is to prevent that corruption from escaping those boundaries, or at least that's how I understand it.
(But in general corruption inside the sandbox is potentially dangerous too. You need to be careful about what you do with data you get from the sandboxed code. RLBox does help in that area as well.)
This like attacking microservices, you have a module that exposes a set of interfaces and produces outputs when called with specific APIs.
For the sake of example lets say you have an authentication module that says if a given user id is root.
Now imagine producing a sequence of API calls that it will trigger the side effect of is_root(id) being true for an id that it is a plain user.
No sandbox escape took place, only internal corruption of internal data keeping structures that lead the is_root() to misbehave.
Corruption is not an issue when you assume the corruptee to already be an attacker
> Comparing the exploitability of WebAssembly binaries with native binaries, e.g., on x86, shows that WebAssembly re-enables several formerly defeated attacks because it lacks modern mitigations. One example are stack-based buffer overflows, which are effective again because WebAssembly binaries do not deploy stack canaries. Moreover, we find attacks not possible in this form in native binaries, such as overwriting string literals in supposedly constant memory.
That data corruption may be exploitable (e.g. if it lets you overwrite a password) but those kinds of attacks are much much rarer than the kind that wasm prevents.
> the programmer only needs to sanitize any values that come from the sandbox (since they could be maliciously-crafted), a task which RLBox makes easy with a tainting layer.
I don't think I've ever heard any WebAssembly advocates saying that it magically solves all security issues.