5 ms·
You would be executing it within the sandbox, so even if there was malicious code, the ADsafe code wouldn't allow it to run certain parts of the code. You woul
by Osiris 10y ago
You would be executing it within the sandbox, so even if there was malicious code, the ADsafe code wouldn't allow it to run certain parts of the code. You wouldn't have to know ahead of time it anything was bad.
- tscs37 10y agoThat 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