Seccomp: replacing security modules?
Posted May 19, 2011 6:41 UTC (Thu) by cmccabe
Parent article: Seccomp: replacing security modules?
I like the Mac OS X sandbox API.
> int sandbox_init(const char *profile, uint64_t flags,
> char **errorbuf);
> void sandbox_free_error(char *errorbuf);
> kSBXProfileNoInternet TCP/IP networking is prohibited.
> kSBXProfileNoNetwork All sockets-based networking is
> kSBXProfileNoWrite File system writes are prohibited.
> kSBXProfileNoWriteExceptTemporary File system writes are
> restricted to the temporary folder
> /var/tmp and the folder specified by the
> confstr(3) configuration variable
> kSBXProfilePureComputation All operating system
> services are prohibited.
This is the kind of API that userspace should have. Whether or not the mechanism is the LSM, selinux, ftrace, perf, or whatever really isn't the important issue.
The Google Chrome team managed to implement something resembling this sandbox for WebKit using seccomp, a helper thread, a helper process, and some IPC mechanisms. But seriously, why is it that hard for userspace applications to give up some capabilities?
to post comments)