Awesome! Given the Chrome example starting on page 6, here's my guess as to how pledge and unveil will contain Chrome to e.g. protect SSH keys. First, 3 of the 5 Chrome processes are already pledged to disallow filesystem reads. The two remaining ones (RenderProcess and UtilityProcess) can be unveiled to allow directories like * ~/.config/chromium * ~/.cache/chromium * ~/Downloads * /tmp * and anything important I do…
Pledge and Unveil in OpenBSD [pdf]
21–30 of 36 posts
Re: Pledge and Unveil in OpenBSD [pdf]
#22Earlier quoted context omitted.
Not at all, for example you can't implement the ratcheting down semantics of pledge() using seccomp. Say starting with a broader promise set "stdio rpath recvfd", and then dropping to "stdio" after full init. pledge() can also be found in over 85% of OpenBSD's base system.
brings me to the next question: are there linux equivalent ?
[1]: http://www.capsicum-linux.org/ [2]: https://www.freebsd.org/cgi/man.cgi?capsicum(4)
Re: Pledge and Unveil in OpenBSD [pdf]
#23Earlier 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/...
I don't believe pledge is ported to other BSD operating systems, for example FreeBSD uses their own framework, capsicum[1] instead of pledge.
Re: Pledge and Unveil in OpenBSD [pdf]
#24Awesome! Given the Chrome example starting on page 6, here's my guess as to how pledge and unveil will contain Chrome to e.g. protect SSH keys. First, 3 of the 5 Chrome processes are already pledged to disallow filesystem reads. The two remaining ones (RenderProcess and UtilityProcess) can be unveiled to allow directories like * ~/.config/chromium * ~/.cache/chromium * ~/Downloads * /tmp * and anything important I do…
Shouldn't it be veil()?
Re: Pledge and Unveil in OpenBSD [pdf]
#25Earlier quoted context omitted.
pledge is seccomp
Not at all, for example you can't implement the ratcheting down semantics of pledge() using seccomp. Say starting with a broader promise set "stdio rpath recvfd", and then dropping to "stdio" after full init. pledge() can also be found in over 85% of OpenBSD's base system.
Re: Pledge and Unveil in OpenBSD [pdf]
#26Earlier quoted context omitted.
Not at all, for example you can't implement the ratcheting down semantics of pledge() using seccomp. Say starting with a broader promise set "stdio rpath recvfd", and then dropping to "stdio" after full init. pledge() can also be found in over 85% of OpenBSD's base system.
brings me to the next question: are there linux equivalent ?
Re: Pledge and Unveil in OpenBSD [pdf]
#27Earlier quoted context omitted.
Not at all, for example you can't implement the ratcheting down semantics of pledge() using seccomp. Say starting with a broader promise set "stdio rpath recvfd", and then dropping to "stdio" after full init. pledge() can also be found in over 85% of OpenBSD's base system.
On linux you can use firejail if it's necessary (or a container if it's needed).
Re: Pledge and Unveil in OpenBSD [pdf]
#28Earlier quoted context omitted.
Shouldn't it be veil()?
The idea is that everything is "veiled" and you "unveil" the stuff you need access to.
Re: Pledge and Unveil in OpenBSD [pdf]
#29Earlier quoted context omitted.
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/...
Systrace was removed because it's unsafe for multi-threaded programs because of TOCTOU.
Re: Pledge and Unveil in OpenBSD [pdf]
#30Awesome! Given the Chrome example starting on page 6, here's my guess as to how pledge and unveil will contain Chrome to e.g. protect SSH keys. First, 3 of the 5 Chrome processes are already pledged to disallow filesystem reads. The two remaining ones (RenderProcess and UtilityProcess) can be unveiled to allow directories like * ~/.config/chromium * ~/.cache/chromium * ~/Downloads * /tmp * and anything important I do…
Shouldn't it be veil()?