Features/Syscall Filters

From FedoraProject

< Features(Difference between revisions)
Jump to: navigation, search
m (Benefit to Fedora)
(Scope)
Line 30: Line 30:
 
== Scope ==
 
== Scope ==
 
* Get seccomp into upstream kernel: DONE, present in 3.5-rc1
 
* Get seccomp into upstream kernel: DONE, present in 3.5-rc1
* Package libseccomp for Fedora: IN PROGRESS (waiting on review), [https://bugzilla.redhat.com/show_bug.cgi?id=830992 BZ 830992]
+
* Package libseccomp for Fedora: DONE, present in Fedora Rawhide [https://bugzilla.redhat.com/show_bug.cgi?id=830992 BZ 830992]
 
* Get the QEMU/libseccomp patch accepted upstream: IN PROGRESS (v2 patch posted on June 13th by IBM)
 
* Get the QEMU/libseccomp patch accepted upstream: IN PROGRESS (v2 patch posted on June 13th by IBM)
 
* Update Fedora QEMU package to build against libseccomp: NOT DONE
 
* Update Fedora QEMU package to build against libseccomp: NOT DONE

Revision as of 15:49, 27 June 2012


Contents

Syscall Filters

Summary

Syscall filtering is a security mechanism that allows applications to define which syscalls they should be allowed to execute.

Owner

  • Name: Cole Robinson
  • Email: crobinso@redhat.com
  • Name: Paul Moore
  • Email: pmoore@redhat.com

Current status

  • Targeted release: Fedora 18
  • Last updated: June 15, 2012
  • Percentage of completion: 75%

Detailed Description

The syscall filtering concept, and the motivation behind it, is fairly simple; the Linux Kernel supports a very large number of system calls (syscalls), over 300 on x86_64 for the 64 bit implementations alone, with applications typically requiring only a very small subset of these syscalls to function normally. Through the use of syscall filters we can disable certain syscalls on an application by application basis, limiting the potential attack surface of the kernel and reducing the likelihood that a malicious application could exploit a kernel vulnerability.

The Linux Kernel's enhanced/mode-2 seccomp functionality is designed to allow applications to specify a filter that is applied to their own syscalls; the filter can specify just the syscall itself or the syscall in conjunction with a specific set of arguments. The kernel's seccomp filter API is the Berkley Packet Filter (BPF) language, the same as used in the Linux socket filters, but adapted for use with syscalls. The libseccomp library adds an abstraction layer on top of the kernel's seccomp API, allowing application developers a more user-friendly API based on function calls and not the BPF assembly language.

Benefit to Fedora

Increased resistance to exploiting kernel vulnerabilities from applications which implement seccomp based syscall filtering.

Scope

  • Get seccomp into upstream kernel: DONE, present in 3.5-rc1
  • Package libseccomp for Fedora: DONE, present in Fedora Rawhide BZ 830992
  • Get the QEMU/libseccomp patch accepted upstream: IN PROGRESS (v2 patch posted on June 13th by IBM)
  • Update Fedora QEMU package to build against libseccomp: NOT DONE

How To Test

Kernel

  • The traditional kernel regression tests should be preformed to ensure that the kernel's seccomp functionality does not impact the expected functionality when not enabled by the application at runtime.

Libseccomp

  • The libseccomp sources contain a series of automated tests which can be used to test the library's internal seccomp filter generation. It is important to note that these automated tests are tested via a seccomp BPF simulator and not the kernel.
  • A simple negative test could be developed to validate that libseccomp and the kernel perform as expected when a syscall is blocked.

QEMU

  • The traditional QEMU regression tests should be performed to ensure that QEMU's normal functionality is not impacted by the libseccomp patches.

User Experience

Ideally this feature shouldn't be noticeable to the user, the syscall filtering should allow normal execution of the application. Intention is that only people trying to exploit security holes notice that the syscall they are trying to use is blocked :)

Dependencies

  • Kernel updated to 3.5
  • libseccomp included in Fedora
  • QEMU upstream includes support for libseccomp

Applications other than QEMU wishing to use libseccomp only require the kernel and libseccomp support items listed above.

Contingency Plan

Since this is brand new functionality, if it doesn't make it in time for F18, nothing has changed. We just drop this feature page.

Documentation

Release Notes

  • None at this time

Comments and Discussion