4 ms·
Just a reminder that seccomp is available to all the applications, and if you include it in the app itself, you can limit the privileges much better than fireja
by viraptor 10y ago
Just a reminder that seccomp is available to all the applications, and if you include it in the app itself, you can limit the privileges much better than firejail can. For example apps don't usually need to read config, or don't need to open new listening sockets once their initialised. This can be easily done in the app, but not by firejail.
I'm quite disappointed projects don't integrate that functionality upstream. The only popular one I know of is chrome.
- the8472 10y agoopenbsd has a simple api, pledge() [0]. The seccomp APIs are more powerful, but also more difficult to use. Are there simplified wrappers available for them that provide something akin to pledge that could just be sprinkled into your application startup? [0] https://www.openbsd.org/papers/hackfest2015-pledge/mgp00001.html https://www.openbsd.org/papers/hackfest2015-pledge/mgp00001....
- viraptor 10y agoThere's libseccomp which provides nice interface, but still at syscall level. You can't easily implement pledge interface on seccomp, because you can't dereference pointers in BPF. So if you want to support both, you'll have to do a bit of rearchitecture anyway. But it's not very hard. Mostly a: implement was you know, (see if all works, add missing calls, repeat)+ process
- hansjorg 10y agoThe Wikipedia page for seccomp lists some other projects, most notably Firefox, OpenSSH and Tor. https://en.wikipedia.org/wiki/Seccomp https://en.wikipedia.org/wiki/Seccomp