1 =========================== 1 =========================== 2 Linux Security Module Usage 2 Linux Security Module Usage 3 =========================== 3 =========================== 4 4 5 The Linux Security Module (LSM) framework prov 5 The Linux Security Module (LSM) framework provides a mechanism for 6 various security checks to be hooked by new ke 6 various security checks to be hooked by new kernel extensions. The name 7 "module" is a bit of a misnomer since these ex 7 "module" is a bit of a misnomer since these extensions are not actually 8 loadable kernel modules. Instead, they are sel 8 loadable kernel modules. Instead, they are selectable at build-time via 9 CONFIG_DEFAULT_SECURITY and can be overridden 9 CONFIG_DEFAULT_SECURITY and can be overridden at boot-time via the 10 ``"security=..."`` kernel command line argumen 10 ``"security=..."`` kernel command line argument, in the case where multiple 11 LSMs were built into a given kernel. 11 LSMs were built into a given kernel. 12 12 13 The primary users of the LSM interface are Man 13 The primary users of the LSM interface are Mandatory Access Control 14 (MAC) extensions which provide a comprehensive 14 (MAC) extensions which provide a comprehensive security policy. Examples 15 include SELinux, Smack, Tomoyo, and AppArmor. 15 include SELinux, Smack, Tomoyo, and AppArmor. In addition to the larger 16 MAC extensions, other extensions can be built 16 MAC extensions, other extensions can be built using the LSM to provide 17 specific changes to system operation when thes 17 specific changes to system operation when these tweaks are not available 18 in the core functionality of Linux itself. 18 in the core functionality of Linux itself. 19 19 20 The Linux capabilities modules will always be !! 20 Without a specific LSM built into the kernel, the default LSM will be the 21 followed by any number of "minor" modules and !! 21 Linux capabilities system. Most LSMs choose to extend the capabilities >> 22 system, building their checks on top of the defined capability hooks. 22 For more details on capabilities, see ``capabi 23 For more details on capabilities, see ``capabilities(7)`` in the Linux 23 man-pages project. 24 man-pages project. 24 25 25 A list of the active security modules can be f 26 A list of the active security modules can be found by reading 26 ``/sys/kernel/security/lsm``. This is a comma 27 ``/sys/kernel/security/lsm``. This is a comma separated list, and 27 will always include the capability module. The 28 will always include the capability module. The list reflects the 28 order in which checks are made. The capability 29 order in which checks are made. The capability module will always 29 be first, followed by any "minor" modules (e.g 30 be first, followed by any "minor" modules (e.g. Yama) and then 30 the one "major" module (e.g. SELinux) if there 31 the one "major" module (e.g. SELinux) if there is one configured. 31 32 32 Process attributes associated with "major" sec << 33 be accessed and maintained using the special f << 34 A security module may maintain a module specif << 35 named after the module. ``/proc/.../attr/smack << 36 security module and contains all its special f << 37 in ``/proc/.../attr`` remain as legacy interfa << 38 subdirectories. << 39 << 40 .. toctree:: 33 .. toctree:: 41 :maxdepth: 1 34 :maxdepth: 1 42 35 43 apparmor 36 apparmor 44 LoadPin 37 LoadPin 45 SELinux 38 SELinux 46 Smack 39 Smack 47 tomoyo 40 tomoyo 48 Yama 41 Yama 49 SafeSetID <<
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.