News for hackers. Stuff that matters.
Re:Writing Exploit-Resistant Code with OpenBSD by saagarjha on Monday May 06, 2019 @12:15AM (#19836829)
> Always use fork+exec to spawn the child processes

Why not posix_spawn?

Re:Writing Exploit-Resistant Code with OpenBSD by jmgao on Monday May 06, 2019 @02:15AM (#19837213)
posix_spawn is fine for that point in particular: it's encouraging the use of exec to regenerate state in servers that fork child processes as workers, so that accidentally leaking information from the child doesn't also leak it for the original parent process as well.

posix_spawn-style interfaces aren't particularly friendly to spawning processes with reduced privileges though, because you don't want to drop privileges in the parent.