3 ms·
is it possible to have arbitrary code execution in Go? I'm just curious.
by m00dy 7y ago
is it possible to have arbitrary code execution in Go? I'm just curious.
- roblabla 7y agoGo has a few escape hatches like the unsafe package, but outside from that, I'm pretty sure arbexec isn't achievable in Go. The compiler inserts bounds check to prevent overflows, UAF isn't really achievable thanks to the GC, etc...
- pcwalton 7y agoYou can have UAF in Go due to slicing in the presence of concurrency: the implementation doesn't use multi-word atomics to update fat pointers like slices and interfaces. That said, it's not easy to do so.