Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This interface makes a system call at run time to reduce privileges. I wonder if there is a way to do this statically and automatically, either with some header file magic, or by analyzing the symbols in the executable: just assume at link time that any system calls it makes (and only those) are allowed.


Looking at a program statically and limiting its privileges automatically would be good (autotame?), but it misses the point that tame appears to be trying to solve. Specifically, it is often the case that programs need more privilege once at initialization time, and less privileges later. So at startup, your program needs to open some files, and open listening network sockets, etc., but once initialization is done it just needs CPU. A static analysis would see that the program opens files and listening sockets and stuff, and grant those privileges forever. If you want to capture the reduced privileges required after the one-time initialization then you need to modify the program to use something like tame (or capsicum, etc.).


well, if it can create new address space mappings, it can simply create a new text mapping and execute the call from there.

If anything, the place to implement it statically could be either a virtual machine jit, or at the compilation stage.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: