Pledge and Unveil in OpenBSD [pdf]
openbsd.org
Pledge and Unveil in OpenBSD [pdf]
1–10 of 36 posts
Re: Pledge and Unveil in OpenBSD [pdf]
#2Re: Pledge and Unveil in OpenBSD [pdf]
#3Re: Pledge and Unveil in OpenBSD [pdf]
#4The PDF has no introduction section, seems to be aimed at people who already know what it's talking about. Can anyone shed some light on what is the idea here? I honestly don't understand what's going on, apart from that it seems to be some security-related feature (or actually two of them?)
For example:
/* Only the system calls required
* for the standard I/O library and
* for accessing /dev/tty are allowed
* by the kernel from this point on.
*/
pledge("stdio tty", NULL);
The second argument is the execpromises, i.e., the pledges enforced for child processes. This does not need to be specified if you pledge in a way that does not include any way of spawning a new process.What's new in the slides linked is unveil(2). This seems to be used to limit the exact paths a process can access and with what access flags (rwxc).
Re: Pledge and Unveil in OpenBSD [pdf]
#5The PDF has no introduction section, seems to be aimed at people who already know what it's talking about. Can anyone shed some light on what is the idea here? I honestly don't understand what's going on, apart from that it seems to be some security-related feature (or actually two of them?)
pledge(2) on OpenBSD is used to drop the privileges of a process. Processes are meant to call pledge(2) to drop their own privileges. The way pledge(2) works is that the system calls of that process get limited. If a process calls a system call outside the allowed range after calling pledge(2), it gets killed. Starting with OpenBSD 6.3, it is also possible to configure pledge to make the kernel return ENOSYS instead…
[1] http://packetfactory.openwall.net/projects/stephanie/index.h...
Re: Pledge and Unveil in OpenBSD [pdf]
#6Earlier quoted context omitted.
pledge(2) on OpenBSD is used to drop the privileges of a process. Processes are meant to call pledge(2) to drop their own privileges. The way pledge(2) works is that the system calls of that process get limited. If a process calls a system call outside the allowed range after calling pledge(2), it gets killed. Starting with OpenBSD 6.3, it is also possible to configure pledge to make the kernel return ENOSYS instead…
Wasn't there some kind of equiv in OpenBSD long ago, by Niels Provos? Or was it the Stephanie patch? [1] At the bottom they mention Qmail which was immediately my first thought as an example as well, since it breaks up MTA tasks to different daemons. [1] http://packetfactory.openwall.net/projects/stephanie/index.h...
Re: Pledge and Unveil in OpenBSD [pdf]
#7Earlier quoted context omitted.
Wasn't there some kind of equiv in OpenBSD long ago, by Niels Provos? Or was it the Stephanie patch? [1] At the bottom they mention Qmail which was immediately my first thought as an example as well, since it breaks up MTA tasks to different daemons. [1] http://packetfactory.openwall.net/projects/stephanie/index.h...
I think you're refering to systrace. It was removed in OpenBSD 6.0. http://www.citi.umich.edu/u/provos/systrace/
How do other Unices such as Linux deal with this issue (IIRC systrace was ported to other Unices)? Is Pledge ported to other BSDs?
[1] http://man.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/...
Re: Pledge and Unveil in OpenBSD [pdf]
#8The PDF has no introduction section, seems to be aimed at people who already know what it's talking about. Can anyone shed some light on what is the idea here? I honestly don't understand what's going on, apart from that it seems to be some security-related feature (or actually two of them?)
Re: Pledge and Unveil in OpenBSD [pdf]
#9Earlier quoted context omitted.
I think you're refering to systrace. It was removed in OpenBSD 6.0. http://www.citi.umich.edu/u/provos/systrace/
Thanks, that's exactly what I meant. Why was it removed? I did notice pledge(2) first appeared in 5.9 [1] How do other Unices such as Linux deal with this issue (IIRC systrace was ported to other Unices)? Is Pledge ported to other BSDs? [1] http://man.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/...
Re: Pledge and Unveil in OpenBSD [pdf]
#10Earlier quoted context omitted.
I think you're refering to systrace. It was removed in OpenBSD 6.0. http://www.citi.umich.edu/u/provos/systrace/
Thanks, that's exactly what I meant. Why was it removed? I did notice pledge(2) first appeared in 5.9 [1] How do other Unices such as Linux deal with this issue (IIRC systrace was ported to other Unices)? Is Pledge ported to other BSDs? [1] http://man.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/...
Linux provide seccomp-bpf for system call restrictions. [3]
[1] https://marc.info/?l=openbsd-misc&m=146170224108205&w=2
[2] http://www.openbsd.org/papers/hackfest2015-pledge/mgp00009.h...