Also known as: SELinux · AppArmor · MAC · mandatory access control
SELinux and AppArmor are Linux mandatory access control systems that confine processes to explicitly permitted actions, so that even a process running as root is limited to what its policy allows.
Standard Unix permissions are discretionary: a process running as root can do anything. Mandatory access control adds a second, non-bypassable layer enforced by policy regardless of user identity, which is what contains a compromised privileged service.
The two differ in approach — SELinux labels objects and is extremely granular but complex, while AppArmor uses path-based profiles that are simpler to write. Both are frequently disabled by administrators troubleshooting an unrelated problem, which removes a meaningful layer of defence.
Principle of Least Privilege
The principle of least privilege holds that every user, process, and system should be granted only the minimum permissions necessary to perform its function, and no more.
seccomp
seccomp is a Linux kernel feature that restricts which system calls a process may make, reducing the kernel attack surface available to a compromised or untrusted program.
Kernel
The kernel is the core of an operating system, responsible for managing memory, scheduling processes, and mediating all access between software and hardware. The Linux kernel is the component that makes a system 'Linux'.
Defense in Depth
Defense in depth is a security strategy that layers multiple independent controls so that the failure or bypass of any single control does not result in compromise.
Container
A container is a process or group of processes running in isolation on a shared kernel, using namespaces for visibility isolation and cgroups for resource limits, packaged with its own filesystem and dependencies.