News for hackers. Stuff that matters.
Re:Show HN: Sandy – A tiny Sandbox to run untrusted code ️ by minitech on Monday January 13, 2020 @03:55AM (#22032889)
I’m not really familiar with ptrace, but does this

  if regs.Orig_rax == 0 {
mean it only intercepts the read syscall? Seems like any security someone was hoping to provide with this could be bypassed entirely by accident (e.g. a script in a language that always uses readv).

Anyway if that is what it means you should probably not describe this as “to run untrusted code”.

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().