3 ms·
Moreover, I'd take sandboxed JavaScript over sandboxed native code any day, given the complexity of modern browser IPC and how much kernel surface area tends to
by pcwalton 11y ago
Moreover, I'd take sandboxed JavaScript over sandboxed native code any day, given the complexity of modern browser IPC and how much kernel surface area tends to be exposed even to sandboxed processes on Windows and Mac.
- JoshTriplett 11y agoModern browser IPC is what backs JavaScript as well as sandboxed native code, so that's not going to save you. Windows/OSX issues aside, on Linux I'm more comfortable with seccomp-bpf than with a sandbox that's based solely on assuming an absence of security holes in a JavaScript virtual machine.
- pcwalton 11y agoOh, I don't want to argue that unsandboxed JavaScript—and by this I mean unsandboxed at the OS level—is more secure than sandboxed C++. (Now I think there's a reasonable case that it is when compared to the sandboxes on Windows/Mac, but that's debatable and I'm certain that people with more expertise in security than I have disagree with me.) My point is that I prefer having the JS VM and the OS-level sandbox, as opposed to just the OS-level sandbox. Regarding IPC, I think there's a difference in terms of surface area between being able to call the Web APIs and being able to send arbitrary bytes (and shmem, etc.) across the named pipes/file descriptors.