Live data from Hacker News

Pledge() – a new mitigation mechanism in OpenBSD

openbsd.org

1–10 of 119 posts

Re: Pledge() – a new mitigation mechanism in OpenBSD

#5
For fun I made a perl web app use this. Much simpler than systace or seccomp.

I use the path argument as simple form of chroot(2). Previously I had to create a vnd (think loopback device if you are coming from linux) to chroot nicely. On code updates, some process had to rsync static assets into the chroot (I preload all of the needed perl, then chroot()). On linux, the same app uses containers/namespaces. Leveraging read only bind mounts for static assets, seccomp, and various prctrl fiddling. All that ends up being a few hundred lines of code. With pledge is really just a few lines to call the syscall. Much easier to reason about.

Even if you end up having to allow most syscalls, the path argument alone IMHO makes it worth it.

Re: Pledge() – a new mitigation mechanism in OpenBSD

#7

I would love to see all the other operating systems adopt pledge(), but as is often the case with OpenBSD's security mitigations, it will be years before we see it happen (if at all).

This is kind-of a different case than most mitigations, though. It's right now only possible because OpenBSD takes a whole-system approach to development; how the different syscall groups work can change, and right now only follows "this seems like it aligns with how we usually do things in OpenBSD." But yes, I would like to see a similar mechanism appear in other operating systems.
Post reply on HN