Re:Show HN: Sandy – A tiny Sandbox to run untrusted code ️
by saagarjha on Monday January 13, 2020 @04:19AM
(#22032998)
Yes. There's a number of other ways to get around this too, one that comes to mind is mmap. Plus I'm fairly sure spawning a new thread would work as well: one because it's possible to do so without it being watched, and two because you can TOCTOU, from another thread, the registers while they're being verified.
Re:Show HN: Sandy – A tiny Sandbox to run untrusted code ️
by tyingq on Monday January 13, 2020 @06:55AM
(#22033644)
Yes, that's right, SYS_READ is 0. So pread(), readv() and preadv() would go around this.
Edit: A sibling comment mentioned mmap() as another workaround. That made me think of yet another....sendfile().
Anyway if that is what it means you should probably not describe this as “to run untrusted code”.