4 ms·
That would work but only if the sandbox is perfect. If the sandbox is leaky in either direction, the code can behave malicious again. As some research showed,
by tscs37 10y ago
That would work but only if the sandbox is perfect.
If the sandbox is leaky in either direction, the code can behave malicious again.
As some research showed, even if your sandbox is absolutely perfect, you can break out using memory corruption through cosmic rays (no kidding)
https://www.cs.princeton.edu/~appel/papers/memerr.pdf https://www.cs.princeton.edu/~appel/papers/memerr.pdf
So to almost 100% protect against malicious javascript code we would have to:
1) Create a JS subset that is verifiably safe
2) Create a Sandbox for that JS subset that is verifiably safe
3) Ensure the Sandbox cannot leak data, which is going to be hard since it's probably going to interact with the user in some way
4) Have the consumer run ECC memory to reduce the chance of Sandbox-Leakage