index.rst 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. ===========================
  2. Linux Security Module Usage
  3. ===========================
  4. The Linux Security Module (LSM) framework provides a mechanism for
  5. various security checks to be hooked by new kernel extensions. The name
  6. "module" is a bit of a misnomer since these extensions are not actually
  7. loadable kernel modules. Instead, they are selectable at build-time via
  8. CONFIG_DEFAULT_SECURITY and can be overridden at boot-time via the
  9. ``"security=..."`` kernel command line argument, in the case where multiple
  10. LSMs were built into a given kernel.
  11. The primary users of the LSM interface are Mandatory Access Control
  12. (MAC) extensions which provide a comprehensive security policy. Examples
  13. include SELinux, Smack, Tomoyo, and AppArmor. In addition to the larger
  14. MAC extensions, other extensions can be built using the LSM to provide
  15. specific changes to system operation when these tweaks are not available
  16. in the core functionality of Linux itself.
  17. The Linux capabilities modules will always be included. This may be
  18. followed by any number of "minor" modules and at most one "major" module.
  19. For more details on capabilities, see ``capabilities(7)`` in the Linux
  20. man-pages project.
  21. A list of the active security modules can be found by reading
  22. ``/sys/kernel/security/lsm``. This is a comma separated list, and
  23. will always include the capability module. The list reflects the
  24. order in which checks are made. The capability module will always
  25. be first, followed by any "minor" modules (e.g. Yama) and then
  26. the one "major" module (e.g. SELinux) if there is one configured.
  27. Process attributes associated with "major" security modules should
  28. be accessed and maintained using the special files in ``/proc/.../attr``.
  29. A security module may maintain a module specific subdirectory there,
  30. named after the module. ``/proc/.../attr/smack`` is provided by the Smack
  31. security module and contains all its special files. The files directly
  32. in ``/proc/.../attr`` remain as legacy interfaces for modules that provide
  33. subdirectories.
  34. .. toctree::
  35. :maxdepth: 1
  36. apparmor
  37. LoadPin
  38. SELinux
  39. Smack
  40. tomoyo
  41. Yama
  42. SafeSetID
  43. ipe