Last week, I talked a bit about a few Linux security features that come standard with the kernel and with most distributions. This week, Iâd like to go a little bit further in-depth about possible security measures with Linux specifically, namely the SELinux system.
SELinux is short for Security-Enhanced Linux, and it is comprised of a series of patches to the Linux kernel working in tandem with a few utilities outside of kernel-space to implement what is known as an MAC (mandatory access control) system, as opposed to Linuxâs Unix-descendent DAC (discretionary access control) system.
Under normal, non-SELinux operation, processes are spawned by users, and access is restricted by the use of permission bits; this has the consequence that a malformed application, be it malicious or inadvertent, may have the ability to touch, read, write, or execute other objects owned by the user who spawned the process. This also implies that there is heightened danger in running superuser; an application spawned by root is considered to have elevated privileges and can potentially cause irreparable harm to a system if misused or malformed. However, this can be sidestepped through the use of SELinux, which may be conceptualized (somewhat inaccurately) as a sort of stateful âfirewallâ between programs. Under SELinux, thereâs no true concept of the superuser as implemented in standard Linux, and the entire system and all of its users and objects (files, directories, daemons, user programs) are broken down explicitly, granularly, and individually. The security administrator is enabled to write a policy for their system to the specific requirements of their system, which is used any time an object is accessed, be it for reference, or modification, or for execution. As mentioned in the text for ICS-382, this is an example of an âislandâ-type access control system. Used in conjunction with proper settings for things like ntpd, httpd, dhcpcd, ftpd, sshd, and other network-exposed services, as well as basic measures for information security such as redundant encrypted disks, SELinux can produce one of the most secure operating environments available today.
One important thing to note, however, is that SELinux should not be attempted without first reading the documentation thoroughly, as it is very easy for an inexperienced user to create a system that is inaccessible or that otherwise lacks the security SELinux is designed to provide if the fledgeling administrator does not have a complete understanding of policy-writing and the consequences of access limitation on their machine.