3 ms·
I don’t think wasm supports polymorphic code. I’m pretty sure the code section of a wasm module is not modifiable. It might not even be readable by the module i
by josephg 3y ago
I don’t think wasm supports polymorphic code. I’m pretty sure the code section of a wasm module is not modifiable. It might not even be readable by the module itself.
The point of wasm is to allow C code to run unmodified, safely, and with as little performance degradation as possible. Sandboxing will mitigate a huge percentage of security vulnerabilities in wasm modules but C is still C. If you want better memory safety, use wasm with a memory safe language.
- eyberg 3y agoThe problem as I pointed out in another thread is that it doesn't matter if you are using something like rust. Wasm downgrades rust memory safety "guarantees" because those guarantees are only truly enforced by the operating system.
- junon 3y agoSorry to be blunt but this is a completely nonsense comment that severely misunderstands how applications, memory, Rust and operating systems work together.
- slimsag 3y agoIt's actually the hardware that enforces such guarantees. The OS could have bugs, like the WASM program - even if the entire stack is written in Rust from top to bottom. Really the only solution is memory safe hardware, which there is effort going into, e.g. ARM CHERI[0] and ARM MTE [0] https://msrc.microsoft.com/blog/2022/01/an_armful_of_cheris/ https://msrc.microsoft.com/blog/2022/01/an_armful_of_cheris/
- eyberg 3y agoThis is one of the few comments here I actually agree with. Totally agree our current architecture is totally broken. It sounds like ARM MTE is coming soonish so excited to see that.