Google Ports Capsicum To Linux, and Other End-of-Year Capsicum News
An anonymous reader writes "Security researcher Robert Watson at the University of Cambridge has posted a blog article describing recent progress on the Capsicum security model, which will shortly appear in FreeBSD 10.0 enabled by default, and has now been ported to Linux by Google, who have posted patches with the intent to upstream to the Linux kernel."
Capability systems are pretty interesting.
Its a real mouthful!
An actual tech article on slashdot. Will my heart recover? Can someone explain what exactly Capsicum is?
SPICY!!!@!
Looks like it is the name of a type of flowering plant and appears to be the name of a capabilities-based security framework.
Apparently, it has nothing to do with the issue some geeks have with their caps lock key after surfing the web one handed . . .
Sdelat' Ameriku velikoy Snova!
Google is funding this (both the direct research on FreeBSD and the port to the Linux kernel) because it addresses an aspect one level above the browser. Google Chrome would then be quite tightly sandboxed. This sure beats my method of running browsers as another user (I symlink ~/Downloads to my web user's version of that area and move things out of it quickly), especially since my method wouldn't do anything against actual privilege escalation (to root).
This should also help fight web server exploits (among other malware), especially w.r.t. installing rootkits. Should be great ammunition for advocating *Nix over Windows 8.
I'm excited, but I can wait for it to hit Linux (probably; FreeBSD will release with it by default in few weeks).
Use my userscript to add story images to Slashdot. There's no going back.
> Last time I tried SELinux, many years ago, I found I was always having to expand privileges so that utilities and apps could do their jobs.
> We finally said the heck with it, and gave pretty much every permission to every program.
Other people had the same problem and reported exactly what the log said, so the distro default policies have been updated. That pretty much solved the problem, so SELinux is ready for you to give it another try.
Also, there exist "targeted" policies which restrict only the most likely vectors, such as PHP. With targeted policy, it's like PHP is running under SELinux but Gimp is not.
> but it doesn't sound too secure, leaving it up to the app to police itself.
> We've seen how well that didn't work in places like Wall Street. Is Capiscum's real security the sandboxing?
As a simple example, many web server exploits write files to /var/tmp and then to /sbin. It's not that Apache or Nginx is malicious, Apache is being tricked into writing those files. With Capsicum, Apache would, on start-up, declare to the OS "don't let me write any files outside of cgi-data/."
cgi-data?
Is this a time-traveling web server from the 90s?
Snark aside, it's also advantageous to prevent Apache/nginx/whatever from being able to run/interpret/process PHP/Perl/Python code outside of a carefully restricted set.
Eloi, Eloi, lema sabachtani?
www.fogbound.net
Improved security models like SE Linux or now capsicum are intellectually interesting, but do they solve a real problem?
After all there are really few working exploits in the wild against up to date Linux systems, and a non up- to date system will be hacked anyway, with or without fancy security models.
To tackle the Cyber Warfare thing, we should go for Memory Safe Languages:
http://en.wikipedia.org/wiki/Memory_safety
http://en.wikipedia.org/wiki/Type_safety
Some processes are gatekeepers of data, e.g. the X11 server. An attacker capable of subverting the X11 server can access essentially all data of the user, as all data is displayed via the X11 screen. That means process-level security is not really that much useful.
Hey TR, thanks for the comprehensive replies (to be honest I thought I'd asked so late no one would see them) - you elaborated on things that I did not glean from the presentation. Well done for splitting secomp and secomp-bpf up too. I have a few more questions:
Does Capsicum only work at the process level? I can't have a more privileged thread that is still uncontained (i.e. still able to perform a blocked syscall) while other threads are contained?
Yes. There's no point sandboxing a thread, because if you compromise one thread you can write over every other thread's memory, and trivially do ROP tricks to make another thread make the system calls on your behalf.
How do you envision codebases supporting Capsicum in a way that they leaves them still portable to platforms where Capsicum is not available? Is it going to be a case of #ifdefs all the way down?
The Capsicum APIs can mostly be #ifdef'd away. The things that restrict rights on a file descriptor and the cap_enter() syscall can just be turned into no-ops.
Would it be possible to make a sandbox program that uses Capsicum to in turn sandbox another (Capsicum-unaware) program that it goes on to run or is it likely going to be too restrictive for the second program?
I don't think I understand this question.
I am TheRaven on Soylent News
The last question was basically "Can I use Capsicum to create a program that in turn isolates other arbitrary programs in a meaningful way (e.g. in the style of sandboxie)"?
It's probably more interesting to integrate this kind of sandboxing directly with rtld, so that it can drop privileges and inject the shims itself.
I am TheRaven on Soylent News