SELinux
SELinux is a Linux kernel security system that labels processes and resources, then applies mandatory policy to decide which interactions are allowed. It limits what a process can do even when ordinary Unix permissions would allow more.
itLinux | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Intro
SELinux
Security-Enhanced Linux, or SELinux, is a mandatory access control system in the Linux kernel. It labels processes and resources with security contexts. Loaded policy then decides whether a labeled process may perform a specific operation on a labeled resource.
SELinux adds a control layer after traditional discretionary access control. Unix ownership, mode bits, and access control lists still apply. If those controls deny an operation, SELinux does not need to evaluate it. If they allow the operation, SELinux can still deny it.
The practical goal is containment. A web server process may run as a service account that can read many files. SELinux policy can confine that process to the types and operations required for serving content. A compromised process then remains inside a smaller boundary than its Unix identity alone would provide.
The access decision
Follow one request through the system:
- A process in a source domain requests an operation, such as reading a file or binding a port.
- The target object carries a type, and the operation belongs to an object class, such as
fileortcp_socket. - Traditional Unix access checks run first.
- The SELinux security server consults the loaded policy for the source type, target type, class, and permission.
- The Access Vector Cache, or AVC, stores recent decisions to avoid repeating the same policy lookup.
- The kernel allows the operation only when every applicable control permits it.
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://selinuxproject.org/
Supports
- Upstream project identity, maintained components, and community resources
- Official URL and reference-study entry
- https://github.com/SELinuxProject/selinux-notebook
Supports
- SELinux architecture, security contexts, type enforcement, classes, and permissions
- Policy language, transitions, users, roles, MLS, and MCS concepts
- Reference link rationale
- https://docs.kernel.org/admin-guide/LSM/SELinux.html
Supports
- SELinux as a Linux Security Module
- Kernel configuration, boot controls, enforcement, and policy loading
- Kernel administration link rationale
- https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html-single/using_selinux/using_selinux
Supports
- MAC and DAC decision order, security-context fields, types, and domains
- Enforcing, permissive, and disabled states
- Targeted and MLS policy behavior
- Context inspection, persistent file contexts, restorecon, ports, and booleans
- AVC diagnosis, sealert, audit2allow review, custom modules, and automation
- Quiz answers and RHEL Landscape placement
- https://docs.oracle.com/en-us/iaas/oracle-linux/selinux/selinux-about-administering-selinux-in.htm
Supports
- Oracle Linux SELinux integration and mandatory-access decision flow
- Oracle Linux Landscape placement
- https://docs.oracle.com/en-us/iaas/oracle-linux/selinux/selinux-administering-selinux-policies.htm
Supports
- Targeted and MLS policy distinctions
- SELinux boolean administration on Oracle Linux
- https://source.android.com/docs/security/features/selinux
Supports
- Android use of SELinux for mandatory access control over all processes
- Permissive Android 4.3, partial enforcement in Android 4.4, and full enforcement in Android 5.0
- Per-domain permissive mode and Android Landscape placement
- https://source.android.com/docs/security/features/selinux/build
Supports
- Monolithic Android policy through 7.0
- Separate platform and vendor policy in Android 8.0
- Advanced reference-link rationale
- https://github.com/SELinuxProject/refpolicy/wiki
Supports
- Reference Policy organization, interfaces, and contribution documentation
- Reference-link rationale
- https://github.com/SELinuxProject/setools
Supports
- SETools as SELinux policy analysis tools
- Policy query, inspection, and comparison study path
- https://github.com/sindresorhus/awesome
Supports
- Starting index used for required awesome-list discovery
- https://github.com/wandapeter/awesome-fedora-security
Supports
- Discovery of Fedora SELinux Policy and RHEL 9 CIS automation role
- Archived status considered during curation
- https://github.com/fedora-selinux/selinux-policy
Supports
- Fedora distribution SELinux policy project and Awesome Links rationale
- Fedora Landscape placement
- https://github.com/ansible-lockdown/RHEL9-CIS
Supports
- RHEL 9 CIS automation role and SELinux hardening controls
- Awesome Links rationale
- https://www.nsa.gov/Research/NSA-Mission-Oriented-Research/LACR/
Supports
- SELinux open-source release on 2000-12-22
- SE for Android release in 2012 and Android 4.3 adoption in 2013
- https://www.nsa.gov/portals/75/documents/resources/everyone/digital-media-center/publications/research-papers/implementing-selinux-as-linux-security-module-report.pdf
Supports
- SELinux port to the Linux Security Modules framework
- Technical development between the original patch and mainline integration
- https://www.kernel.org/doc/mirror/ols2008v2.pdf
Supports
- Mainline merge for Linux 2.6 in December 2003
- Fedora Core 2 integration and release in May 2004
- https://source.android.com/docs/compatibility/4.3/android-4.3-cdd
Supports
- Android 4.3 SELinux support and permissive reference implementation
- https://source.android.com/docs/security/enhancements
Supports
- Android 4.4 SELinux enforcement for selected domains
- https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux
Supports
- Red Hat Enterprise Linux product homepage and Landscape entry
- https://fedoraproject.org/
Supports
- Fedora product homepage and Landscape entry
- https://www.oracle.com/linux/
Supports
- Oracle Linux product homepage and Landscape entry
- https://www.android.com/
Supports
- Android product homepage and Landscape entry
- https://www.centos.org/centos-stream/
Supports
- CentOS Stream product homepage and Landscape entry
