Jump to content

seccomp

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 2606:a000:c845:a000:8b3b:8052:6659:de89 (talk) at 03:49, 26 November 2016 (Added mention of Firejail as a product that uses seccomp.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

seccomp
Original author(s)Andrea Arcangeli
Initial releaseMarch 8, 2005; 19 years ago (2005-03-08)
Written inC
Operating systemLinux
TypeSandboxing
LicenseGNU General Public License
Websitecode.google.com/archive/p/seccompsandbox/wikis/overview.wiki

seccomp (short for secure computing mode) is a computer security facility that provides an application sandboxing mechanism in the Linux kernel. It was merged into the Linux kernel mainline in kernel version 2.6.12, which was released on March 8, 2005.[1] seccomp allows a process to make a one-way transition into a "secure" state where it cannot make any system calls except exit(), sigreturn(), read() and write() to already-open file descriptors. Should it attempt any other system calls, the kernel will terminate the process with SIGKILL. In this sense, it does not virtualize the system's resources but isolates the process from them entirely.

seccomp mode is enabled via the prctl(2) system call using the PR_SET_SECCOMP argument, or (since Linux kernel 3.17[2]) via the seccomp(2) system call.[3] seccomp mode used to be enabled by writing to a file, /proc/self/seccomp, but this method was removed in favor of prctl().[4] In some kernel versions, seccomp disables the RDTSC x86 instruction.[clarification needed][5]

seccomp-bpf is an extension to seccomp[6] that allows filtering of system calls using a configurable policy implemented using Berkeley Packet Filter rules. It is used by OpenSSH and vsftpd as well as the Google Chrome/Chromium web browsers on Chrome OS and Linux.[7] (In this regard seccom-bpf achieves similar functionality to the older systrace—which seems to be no longer supported for Linux).

Software Products Using Seccomp

  • One of the most prominent software solutions using seccomp is Docker. Docker is an open source project, primarily backed by Docker Inc., that enables software to run inside of isolated containers. When a Docker container is created, using docker run or docker create sub-commands, a seccomp profile can be associated with the container using the --security-opt parameter.
  • seccomp was first devised by Andrea Arcangeli in January 2005 for use in public grid computing and was originally intended as a means of safely running untrusted compute-bound programs.
  • Arcangeli's CPUShare was the only known user of this feature.[8] Writing in February 2009, Linus Torvalds expresses doubt whether seccomp is actually used by anyone.[9] However, a Google engineer replied that Google is exploring using seccomp for sandboxing its Chrome web browser.[10][11]
  • Firejail is an open source Linux sandbox program that utilizes Linux Namespaces, Seccomp, and other kernel-level security features to sandbox Linux and Wine applications.[12]
  • As of Chrome version 20, seccomp-bpf is used to sandbox Adobe Flash Player.[13]
  • As of Chrome version 23, seccomp-bpf is used to sandbox the renderers.[14]
  • Vsftpd uses seccomp-bpf sandboxing as of version 3.0.0.[15]
  • OpenSSH has supported seccomp-bpf since version 6.0.[16]
  • Mbox uses ptrace along with seccomp-bpf to create a secure sandbox with less overhead than ptrace alone.[17]
  • LXD, an Ubuntu "hypervisor" for containers[18][19]
  • Firefox and FirefoxOS, which use seccomp-bpf[20][21]
  • Cjdns uses seccomp-bpf as one of its sandbox mechanisms, filtering the system calls it performs on a Linux system, and strictly limiting its access to the outside world.[22]
  • Tor supports seccomp since 0.2.5.1-alpha[23]
  • Lepton, a JPEG compression tool developed by Dropbox uses seccomp[24]

See also

References

  1. ^ "[PATCH] seccomp: secure computing support". Linux kernel history. Kernel.org git repositories. 2005-03-08. Retrieved 2013-08-02.
  2. ^ "Linux kernel 3.17, Section 11. Security". kernelnewbies.org. 2013-10-05. Retrieved 2015-03-31.
  3. ^ "seccomp: add "seccomp" syscall". kernel/git/torvalds/linux.git - Linux kernel source tree. kernel.org. 2014-06-25. Retrieved 2014-08-22.
  4. ^ Arcangeli, Andrea (2007-06-14). "[PATCH 1 of 2] move seccomp from /proc to a prctl". Retrieved 2013-08-02.
  5. ^ Tinnes, Julien (2009-05-28). "Time-stamp counter disabling oddities in the Linux kernel". cr0 blog. Retrieved 2013-08-02.
  6. ^ Corbet, Jonathan (2012-01-11). "Yet another new approach to seccomp". lwn. Retrieved 2013-08-02.
  7. ^ Tinnes, Julien (2012-11-19). "A safer playground for your Linux and Chrome OS renderers". The Chromium Blog. Retrieved 2013-08-02.
  8. ^ van de Ven, Arjan (2009-02-28). "Re: [stable] [PATCH 2/2] x86-64: seccomp: fix 32/64 syscall hole". Linux Kernel Mailing List. Retrieved 2013-08-02.
  9. ^ Torvalds, Linus (2009-02-28). "Re: [PATCH 2/2] x86-64: seccomp: fix 32/64 syscall hole". Linux Kernel Mailing List. Retrieved 2013-08-02.
  10. ^ Gutschke, Markus (2009-05-06). "Re: [PATCH 2/2] x86-64: seccomp: fix 32/64 syscall hole". Retrieved 2013-08-02.
  11. ^ Gutschke, Markus (2009-05-06). "Re: [PATCH 2/2] x86-64: seccomp: fix 32/64 syscall hole". Linux Kernel Mailing List. Retrieved 2013-08-02.
  12. ^ "Firejail". Firejail. Retrieved 2016-11-26.
  13. ^ Evans, Chris (2012-07-04). "Chrome 20 on Linux and Flash sandboxing". Retrieved 2013-08-02.
  14. ^ Tinnes, Julien (2012-09-06). "Introducing Chrome's next-generation Linux sandbox". cr0 blog. Retrieved 2013-08-02.
  15. ^ Evans, Chris (2012-04-09). "vsftpd-3.0.0 and seccomp filter sandboxing is here!". Retrieved 2013-08-02.
  16. ^ "Openssh 6.0 release notes". Retrieved 2013-10-14.
  17. ^ "MBOX". Retrieved 2014-05-20.
  18. ^ "LXD an "hypervisor" for containers (based on liblxc)". Retrieved 2014-11-08.
  19. ^ "Where We're Going With LXD". Retrieved 2014-11-08.
  20. ^ Destuynder, Guillaume (2012-09-13). "Firefox Seccomp sandbox". Mozilla Bugzilla. Retrieved 2015-01-13.
  21. ^ Destuynder, Guillaume (2012-09-13). "Firefox Seccomp sandbox". Mozilla Wiki. Retrieved 2015-01-13.
  22. ^ DeLisle, Caleb James (2014-09-24). "Added SECCOMP sandboxing and new admin API call to check if permissions are properly dropped". Github. Retrieved 2015-09-24.
  23. ^ "Tor ChangeLog".
  24. ^ "Lepton image compression: saving 22% losslessly from images at 15MB/s". Dropbox Tech Blog. Retrieved 2016-07-15.