Security-Enhanced Linux: Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Content deleted Content added
Wibbble (talk | contribs)
RV linkspam
Removed off-topic discussion of the NSA and adding a backdoor to the kernel.
Tags: Manual revert section blanking
 
(623 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
{{short description|Linux kernel security module}}
'''Security-Enhanced Linux''' ('''SELinux''') is an implementation of [[mandatory access control]] using [[Linux Security Modules]] (LSM) in the [[Linux]] [[kernel (computers)|kernel]], based on the [[principle of least privilege]]. It is not a [[Linux distribution]], but rather a set of modifications that can be applied to Unix-like [[operating system]]s, such as [[Linux]] and [[BSD]].


{{Infobox software
__TOC__
| name = SELinux
Primarily developed by the US [[National Security Agency]], it was released to the [[open source]] development community on [[December 22]], [[2000]]. Other significant contributors include [[Network Associates]], [[Secure Computing Corporation]], and [[Tresys]]. Experimental ports of the [[FLASK]]/TE implementation have been made available via the [[FreeBSD#TrustedBSD|TrustedBSD]] Project for the [[FreeBSD]] and [[Darwin (operating system)|Darwin]] operating systems.
| logo = SELinux logo.svg
| logo caption =
| logo_size = 210x232px
| logo_alt =
| screenshot = SELinux Administration screenshot.png
| caption = SELinux administrator GUI in [[Arch Linux]]
| screenshot_size =
| screenshot_alt =
| collapsible =
| author = [[NSA]] and [[Red Hat]]
| developer = [[Red Hat]]
| released = {{Start date and age|2000|12|22|}}<ref>{{cite web
| title = Security-enhanced Linux available at NSA site - MARC
| url = https://marc.info/?l=linux-kernel&m=97749381725894
| website = [[MARC (archive)|MARC]]
| access-date = 24 December 2018}}</ref>
| discontinued =
| latest release version = 3.6
| latest release date = {{Start date and age|2023|12|13|df=yes}}<ref>{{cite web
| url = https://github.com/SELinuxProject/selinux/releases/tag/3.6
| title = SELinux userspace release 3.6
| publisher = SELinux Project
| date = 2023-12-14
| access-date = 2024-03-16}}</ref>
| latest preview version =
| latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| programming language = [[C (programming language)|C]]
| operating system = [[Linux]]
| platform =
| size =
| language =
| language count = <!-- DO NOT include this parameter unless you know what it does -->
| language footnote =
| genre = Security, [[Linux Security Modules]] (LSM)
| license = [[GNU GPL]]
| website = {{URL|https://selinuxproject.org}}, {{URL|1=https://web.archive.org/web/20201022103915/https://www.nsa.gov/what-we-do/research/selinux/|2=https://www.nsa.gov/what-we-do/research/selinux/}}
| standard =
| AsOf =
}}


'''Security-Enhanced Linux''' ('''SELinux''') is a [[Linux kernel]] [[Linux Security Modules|security module]] that provides a mechanism for supporting [[access control]] security policies, including [[mandatory access control]]s (MAC).
:From [http://www.nsa.gov/selinux/ NSA Security-enhanced Linux Team]:


SELinux is a set of kernel modifications and user-space tools that have been added to various [[Linux distribution]]s. Its [[software architecture|architecture]] strives to separate enforcement of security decisions from the security policy, and streamlines the amount of software involved with security policy enforcement.<ref>{{cite web |url=https://www.nsa.gov/what-we-do/research/selinux/faqs.shtml |title=SELinux Frequently Asked Questions (FAQ) - NSA/CSS |publisher=National Security Agency |access-date=2013-02-06 |archive-date=2018-09-18 |archive-url=https://web.archive.org/web/20180918010353/https://www.nsa.gov/what-we-do/research/selinux/faqs.shtml |url-status=dead }}</ref><ref>{{cite web |first1=Peter |last1=Loscocco |first2=Stephen |last2=Smalley |date=February 2001 |title=Integrating Flexible Support for Security Policies into the Linux Operating System |url=https://www.nsa.gov/resources/everyone/digital-media-center/publications/research-papers/assets/files/flexible-support-for-security-policies-into-linux-feb2001-report.pdf }}</ref> The key concepts underlying SELinux can be traced to several earlier projects by the United States National Security Agency (NSA).
:"NSA Security-enhanced Linux is a set of [[Patch (computing)|patches]] to the Linux [[Linux_kernel|kernel]] and some utilities to incorporate a strong, flexible [[mandatory access control]] (MAC) architecture into the major subsystems of the kernel. It provides a mechanism to enforce the separation of information based on confidentiality and integrity requirements, which allows threats of tampering and bypassing of application security mechanisms to be addressed and enables the confinement of damage that can be caused by malicious or flawed applications. It includes a set of sample security policy configuration files designed to meet common, general-purpose security goals."


==Overview==
''(SELinux has been integrated into version 2.6 series of the Linux kernel, and separate patches are now unnecessary; the above is a historical quote.)''
The NSA Security-enhanced Linux Team describes NSA SELinux as<ref>{{cite web |archive-url=https://web.archive.org/web/20201022103915/https://www.nsa.gov/what-we-do/research/selinux/|archive-date=2020-10-22|url=https://www.nsa.gov/what-we-do/research/selinux/ |title=Security-Enhanced Linux - NSA/CSS |publisher=National Security Agency |date=2009-01-15 |access-date=2021-04-21}}</ref>


<blockquote>a set of [[patch (computing)|patches]] to the [[Linux kernel]] and utilities to provide a strong, flexible, mandatory access control (MAC) architecture into the major subsystems of the kernel. It provides an enhanced mechanism to enforce the separation of information based on confidentiality and integrity requirements, which allows threats of tampering, and bypassing of application security mechanisms, to be addressed and enables the confinement of damage that can be caused by malicious or flawed applications. It includes a set of sample security policy configuration files designed to meet common, general-purpose security goals.</blockquote>
Security-enhanced Linux is a [[FLASK]] implementation integrated in some versions of the Linux kernel with a number of utilities designed to demonstrate the value of mandatory access controls to the Linux community and how such controls could be added to Linux. Such a kernel contains architectural components prototyped in the Fluke operating system. These provide general support for enforcing many kinds of mandatory access control policies, including those based on the concepts of [[type enforcement]], [[RBAC|role-based access control]], and [[multi-level security]]. Observers of operating system security research may recall DTOS, a Mach-derived ''Distributed Trusted Operating System'', on which Flask was based, as well as Trusted Mach, a research project from [[Trusted Information Systems]] that was influential in the design and implementation of DTOS. Those interested in Type Enforcement may also be interested in Domain and Type Enforcement.


A Linux kernel integrating SELinux enforces [[mandatory access control]] policies that confine user programs and system servers to the minimum amount of privilege they require to do their jobs. This reduces or eliminates the ability of these programs and daemons to cause harm when compromised (via buffer overflows or misconfigurations, for example). This confinement mechanism operates independently of the traditional Linux access control mechanisms. It has no concept of a "root" super-user, and does not share the well-known shortcomings of the traditional Linux security mechanisms (such as a dependence on setuid/setgid binaries).
A Linux kernel integrating SELinux enforces mandatory access control policies that confine user programs and system services, as well as access to files and network resources. Limiting privilege to the minimum required to work reduces or eliminates the ability of these programs and [[daemon (computing)|daemons]] to cause harm if faulty or compromised (for example via [[buffer overflow]]s or misconfigurations). This confinement mechanism operates independently of the traditional Linux ([[discretionary access control|discretionary]]) access control mechanisms. It has no concept of a "root" [[superuser]], and does not share the well-known shortcomings of the traditional Linux security mechanisms, such as a dependence on [[setuid]]/[[setgid]] binaries.


The security of an unmodified Linux system depends on the correctness of the kernel, all the privileged applications, and each of their configurations. A problem in any one of these areas may allow the compromise of the entire system. In contrast, the security of a modified system based on the security-enhanced Linux kernel depends primarily on the correctness of the kernel and its security policy configuration. While problems with the correctness or configuration of applications may allow the limited compromise of individual user programs and system daemons, they do not pose a threat to the security of other user programs and system daemons or to the security of the system as a whole.
The security of an "unmodified" Linux system (a system without SELinux) depends on the correctness of the kernel, of all the privileged applications, and of each of their configurations. A fault in any one of these areas may allow the compromise of the entire system. In contrast, the security of a "modified" system (based on an SELinux kernel) depends primarily on the correctness of the kernel and its security-policy configuration. While problems with the correctness or configuration of applications may allow the limited compromise of individual user programs and system daemons, they do not necessarily pose a threat to the security of other user programs and system daemons or to the security of the system as a whole.


From a purist perspective, SELinux provides a hybrid of concepts and capabilities drawn from mandatory access controls, [[mandatory integrity control]]s, [[role-based access control]] (RBAC), and [[type enforcement architecture]]. Third-party tools enable one to build a variety of security policies.
==Features==
*Clean separation of policy from enforcement
*Well-defined policy interfaces
*Independent of specific policies and policy languages
*Independent of specific security label formats and contents
*Individual labels and controls for kernel objects and services
*Caching of access decisions for efficiency
*Support for policy changes
*Controls over process initialization and inheritance and program execution
*Controls over file systems, directories, files, and open file descriptions
*Controls over sockets, messages, and network interfaces
*Controls over use of "capabilities"


==Implementations==
==History==
The earliest work directed toward standardizing an approach providing mandatory and discretionary access controls (MAC and DAC) within a UNIX (more precisely, POSIX) computing environment can be attributed to the [[National Security Agency]]'s Trusted UNIX (TRUSIX) Working Group, which met from 1987 to 1991 and published one [[Rainbow Series|Rainbow Book]] (#020A), and produced a formal model and associated evaluation evidence prototype (#020B) that was ultimately unpublished.
SELinux is available with commercial support as part of [[Red Hat Enterprise Linux]] version 4. The supported policy in RHEL4 is the targeted policy which aims for maximum ease of use and thus is not as restrictive as it might be. Future versions of RHEL will have more restrictive policies.


SELinux was designed to demonstrate the value of mandatory access controls to the Linux community and how such controls could be added to Linux. Originally, the patches that make up SELinux had to be explicitly applied to the Linux kernel source; SELinux was merged into the [[Linux kernel mainline]] in the 2.6 series of the Linux kernel.
In community supported Linux distributions, SELinux is implemented in [[EnGarde Secure Linux]] [http://www.engardelinux.org], it has been implemented in [[Fedora Core]] since version 2, it is part of [[Hardened Gentoo]], and work is proceeding on making it part of [[Debian]][http://www.coker.com.au/selinux/], [[SUSE]][http://www.cip.ifi.lmu.de/~bleher/selinux/], [[Slackware]][http://blog.diyab.net/se-linux/old-files/], [[Ubuntu Linux|Ubuntu]][http://www.ubuntulinux.org/wiki/SELinux], and others.


The NSA, the original primary developer of SELinux, released the first version to the [[Open-source software|open source]] development community under the [[GNU GPL]] on December 22, 2000.<ref>Compare {{cite web
==Criticism==
| url = https://www.nsa.gov/news-features/press-room/press-releases/2001/se-linux.shtml
Some administrators, developers, and security experts have criticized SELinux as too complex to set up and administer. Critics say that due to its complexity, even experienced users are likely to configure SELinux in an unsafe manner or disable it altogether, leaving the system vulnerable to attacks. Supporters of SELinux say that it simply reflects, and provides greater control over, the complexity of the underlying operating system.[http://lwn.net/Articles/103230/]
| archive-url = https://web.archive.org/web/20180918025937/https://www.nsa.gov/news-features/press-room/press-releases/2001/se-linux.shtml
| archive-date = 2018-09-18
| title = National Security Agency Shares Security Enhancements to Linux
| date = 2001-01-02
| work = NSA Press Release
| publisher = National Security Agency Central Security Service
| location = Fort George G. Meade, Maryland
| access-date = 2021-04-21
| quote = The NSA is pleased to announce that it has developed, and is making available to the public, a prototype version of a security-enhanced Linux operating system.}}</ref> The software was merged into the mainline Linux kernel 2.6.0-test3, released on 8 August 2003. Other significant contributors include [[Red Hat]], [[Network Associates]], [[Secure Computing Corporation]], Tresys Technology, and Trusted Computer Solutions. Experimental ports of the [[FLASK]]/TE implementation have been made available via the [[TrustedBSD]] Project for the [[FreeBSD]] and [[Darwin (operating system)|Darwin]] operating systems.


Security-Enhanced Linux implements the [[FLASK|Flux Advanced Security Kernel]] (FLASK). Such a kernel contains architectural components prototyped in the [[Fluke operating system]]. These provide general support for enforcing many kinds of mandatory access control policies, including those based on the concepts of [[type enforcement]], [[role-based access control]], and [[multilevel security]]. FLASK, in turn, was based on DTOS, a Mach-derived [[Distributed Trusted Operating System]], as well as on Trusted Mach, a research project from [[Trusted Information Systems]] that had an influence on the design and implementation of DTOS.{{Citation needed|date=September 2023}}
Some have criticized SELinux for its use of [[inode]] labeling rather than pathnames as the basis for its access control. Such criticism represents a misunderstanding of Unix heritage and internals; the access control enforcement mechanisms of Unix kernels have never relied upon pathnames as their basis, as paths are ambiguous identifiers in Unix systems and do not identify the real objects (the inodes). Just as Linux [[discretionary access control]] (DAC) uses the inode attributes (file owner, group, and mode) as the basis for its enforcement, so SELinux likewise uses extended attributes of the inode as the basis for its access control. Note that administrators specify paths as part of SELinux configuration (mapping pathname regular expressions to file security contexts in the file_contexts configuration) and as arguments to utilities like chcon that are analogous to chown/chmod. But the kernel mechanism does not internally use paths. Proponents of SELinux argue that it would not make sense to do so in a Unix system, especially in a system like Linux that blends Unix concepts with [[Plan 9 from Bell Labs]] concepts like per-process namespaces and bind mounts.

=== Original and external contributors ===

A comprehensive list of the original and external contributors to SELinux was hosted at the NSA website until maintenance ceased sometime in 2009. The following list reproduces the original as [https://web.archive.org/web/20081018034429/http://www.nsa.gov/selinux/info/contrib.cfm preserved] by the Internet Archive Wayback Machine. The scope of their contributions was listed in the page and has been omitted for brevity, but it can be accessed through the archived copy.<ref>{{cite web |title=Contributors to SELinux |url=http://www.nsa.gov/selinux/info/contrib.cfm|archive-url=https://web.archive.org/web/20081018034429/http://www.nsa.gov/selinux/info/contrib.cfm|archive-date=2008-10-18}}</ref>

{{columns-list|colwidth=20em|
* [[National Security Agency|The National Security Agency]] (NSA)
* [[Network Associates Laboratories]] (NAI Labs)
* [[Mitre Corporation|The MITRE Corporation]]
* [[Secure Computing Corporation]] (SCC)
* Matt Anderson
* Ryan Bergauer
* Bastian Blank
* Thomas Bleher
* Joshua Brindle
* [[Russell Coker]]
* John Dennis
* Janak Desai
* Ulrich Drepper
* Lorenzo Hernandez Garcia-Hierro
* Darrel Goeddel
* Carsten Grohmann
* Steve Grubb
* Ivan Gyurdiev
* Serge Hallyn
* Chad Hanson
* Joerg Hoh
* Trent Jaeger
* Dustin Kirkland
* Kaigai Kohei
* Paul Krumviede
* Joy Latten
* Tom London
* Karl MacMillan
* Brian May
* Frank Mayer
* Todd Miller
* Roland McGrath
* Paul Moore
* James Morris
* Yuichi Nakamura
* Greg Norris
* Eric Paris
* Chris PeBenito
* [[Red Hat]]
* Petre Rodan
* Shaun Savage
* Chad Sellers
* Rogelio Serrano Jr.
* Justin Smith
* Manoj Srivastava
* Tresys Technology
* Michael Thompson
* Trusted Computer Solutions
* Tom Vogt
* Reino Wallin
* Dan Walsh
* Colin Walters
* Mark Westerman
* David A. Wheeler
* Venkat Yekkirala
* Catherine Zhang
}}

==Users, policies and security contexts==
SELinux users and roles do not have to be related to the actual system users and roles. For every current user or process, SELinux assigns a three string context consisting of a username, role, and domain (or type). This system is more flexible than normally required: as a rule, most of the real users share the same SELinux username, and all access control is managed through the third tag, the domain. The circumstances under which a process is allowed into a certain domain must be configured in the policies. The command <code>runcon</code> allows for the launching of a process into an explicitly specified context (user, role, and domain), but SELinux may deny the transition if it is not approved by the policy.

Files, network ports, and other hardware also have an SELinux context, consisting of a name, role (seldom used), and type. In the case of file systems, mapping between files and the security contexts is called labeling. The labeling is defined in policy files but can also be manually adjusted without changing the policies. Hardware types are quite detailed, for instance, <code>bin_t</code> (all files in the folder /bin) or <code>postgresql_port_t</code> (PostgreSQL port, 5432). The SELinux context for a remote file system can be specified explicitly at mount time.

SELinux adds the <code>-Z</code> switch to the shell commands <code>ls</code>, <code>ps</code>, and some others, allowing the security context of the files or process to be seen.

Typical policy rules consist of explicit permissions, for example, which domains the user must possess to perform certain actions with the given target (read, execute, or, in case of network port, bind or connect), and so on. More complex mappings are also possible, involving roles and security levels.

A typical policy consists of a mapping (labeling) file, a rule file, and an interface file, that define the domain transition. These three files must be compiled together with the SELinux tools to produce a single policy file. The resulting policy file can be loaded into the kernel to make it active. Loading and unloading policies does not require a reboot. The policy files are either hand written or can be generated from the more user friendly SELinux management tool. They are normally tested in permissive mode first, where violations are logged but allowed. The <code>audit2allow</code> tool can be used later to produce additional rules that extend the policy to allow all legitimate activities of the application being confined.

=={{Anchor|AVC}}Features==
SELinux features include:
* Clean separation of policy from enforcement
* Well-defined policy interfaces
* Support for applications querying the policy and enforcing access control (for example, [[cron]]d running jobs in the correct context)
* Independence of specific policies and policy languages
* Independence of specific security-label formats and contents
* Individual labels and controls for kernel objects and services
* Support for policy changes
* Separate measures for protecting system integrity (domain-type) and data confidentiality ([[multilevel security]])
* Flexible policy
* Controls over process initialization and inheritance, and program execution
* Controls over file systems, directories, files, and open [[file descriptor]]s
* Controls over sockets, messages, and network interfaces
* Controls over the use of "capabilities"
* Cached information on access-decisions via the ''Access Vector Cache'' (AVC)<ref>{{cite book
| author = Fedora Documentation Project
| title = Fedora 13 Security-Enhanced Linux User Guide
| url = https://books.google.com/books?id=feDeO4IglRkC
| access-date = 2012-02-22
| year = 2010
| publisher = Fultus Corporation
| isbn = 978-1-59682-215-3
| page = 18
| quote = SELinux decisions, such as allowing or disallowing access, are cached. This cache is known as the Access Vector Cache (AVC). Caching decisions decreases how often SELinux rules need to checked, which increases performance.}}</ref>
* [[Whitelisting|Default-deny]] policy (anything not explicitly specified in the policy is disallowed)<ref>{{cite web |title=SELinux/Quick introduction - Gentoo Wiki |url=https://wiki.gentoo.org/wiki/SELinux/Quick_introduction#SELinux_policy |website=wiki.gentoo.org}}</ref><ref>{{cite web |title=Getting Started with SELinux |url=https://www.linode.com/docs/security/getting-started-with-selinux/ |website=Linode Guides & Tutorials |language=en}}</ref><ref>{{cite web |title=NB Overview - SELinux Wiki |url=https://selinuxproject.org/page/NB_Overview |website=selinuxproject.org}}</ref>

==Adoption==
[[File:SELinux sestatus screenshot.png|thumb|upright=1.2|<code>sestatus</code> showing status of SELinux in a system]]
SELinux has been implemented in [[Android (operating system)|Android]] since version 4.3.<ref>{{cite web | title=Security-Enhanced Linux in Android | access-date=2016-01-31 | publisher=Android Open Source Project | url=https://source.android.com/security/selinux/}}</ref>

Among free community-supported Linux distributions, [[Fedora (operating system)|Fedora]] was one of the earliest adopters, including support for it by default since Fedora Core 2. Other distributions include support for it such as [[Debian]] as of version 9 Stretch release<ref>{{cite web|url=https://wiki.debian.org/SELinux|title=SELinux|work=debian.org}}</ref> and [[Ubuntu (operating system)|Ubuntu]] as of 8.04 Hardy Heron.<ref>{{cite web|url=https://ubuntu-tutorials.com/2008/03/18/how-to-install-selinux-on-ubuntu-804-hardy-heron/|title=How To Install SELinux on Ubuntu 8.04 "Hardy Heron"|work=Ubuntu Tutorials}}</ref> As of version 11.1, [[SUSE Linux|openSUSE]] contains SELinux "basic enablement".<ref>{{cite web|url=https://news.opensuse.org/2008/08/20/opensuse-to-add-selinux-basic-enablement-in-111/ |title=openSUSE News|date=20 August 2008 }}</ref> [[SUSE Linux Enterprise]] 11 features SELinux as a "technology preview".<ref>{{cite web|url=https://www.novell.com/linux/releasenotes/x86_64/SUSE-SLED/11/#02 |title=Release Notes for SUSE Linux Enterprise Desktop 11 |publisher=[[Novell]] |access-date=2013-02-06}}</ref>

SELinux is popular in systems based on [[linux containers]], such as [[Container Linux by CoreOS|CoreOS Container Linux]] and rkt.<ref>{{cite web|url=https://coreos.com/os/docs/latest/selinux.html |title=SELinux on CoreOS|work=CoreOS Docs}}</ref> It is useful as an additional security control to help further enforce isolation between deployed containers and their host.

SELinux is available since 2005 as part of [[Red Hat Enterprise Linux]] (RHEL) version 4 and all future releases. This presence is also reflected in corresponding versions of derived systems such as [[CentOS]], [[Scientific Linux]], [[AlmaLinux]] and [[Rocky Linux]]. The supported policy in RHEL4 is targeted policy which aims for maximum ease of use and thus is not as restrictive as it might be. Future versions of RHEL are planned to have more targets in the targeted policy which will mean more restrictive policies.

==Use case scenarios==
SELinux can potentially control which activities a system allows each user, process, and daemon, with very precise specifications. It is used to confine [[Daemon (computer software)|daemons]] such as database engines or web servers that have clearly defined data access and activity rights. This limits potential harm from a confined daemon that becomes compromised.

Command-line utilities include:<ref>{{cite web|url=https://fedoraproject.org/wiki/SELinux/Commands |title=SELinux/Commands - FedoraProject |access-date=2015-11-25}}</ref>
<code>chcon</code>,<ref>{{cite web |url=http://linuxcommand.org/man_pages/chcon1.html |archive-url=https://web.archive.org/web/20041024211853/http://linuxcommand.org/man_pages/chcon1.html |url-status=dead |archive-date=2004-10-24 |title=chcon |publisher=Linuxcommand.org |access-date=2013-02-06 }}</ref>
<code>restorecon</code>,<ref>{{cite web|url=http://linux.die.net/man/8/restorecon |title=restorecon(8) - Linux man page |publisher=Linux.die.net |access-date=2013-02-06}}</ref>
<code>restorecond</code>,<ref>{{cite web|url=http://linux.die.net/man/8/restorecond |title=restorecond(8) - Linux man page |publisher=Linux.die.net |access-date=2013-02-06}}</ref>
<code>runcon</code>,<ref>{{cite web|url=http://linux.die.net/man/1/runcon |title=runcon(1) - Linux man page |publisher=Linux.die.net |access-date=2013-02-06}}</ref>
<code>secon</code>,<ref>{{cite web|url=http://linux.die.net/man/1/secon |title=secon(1) - Linux man page |publisher=Linux.die.net |access-date=2013-02-06}}</ref>
<code>fixfiles</code>,<ref>{{cite web|url=http://linux.die.net/man/8/fixfiles |title=fixfiles(8): fix file SELinux security contexts - Linux man page |publisher=Linux.die.net |access-date=2013-02-06}}</ref>
<code>setfiles</code>,<ref name="auto">{{cite web|url=http://linux.die.net/man/8/setfiles |title=setfiles(8): set file SELinux security contexts - Linux man page |publisher=Linux.die.net |access-date=2013-02-06}}</ref>
<code>load_policy</code>,<ref>{{cite web|url=http://linux.die.net/man/8/load_policy |title=load_policy(8) - Linux man page |publisher=Linux.die.net |access-date=2013-02-06}}</ref>
<code>booleans</code>,<ref>{{cite web|url=http://linux.die.net/man/8/booleans |title=booleans(8) - Linux man page |publisher=Linux.die.net |access-date=2013-02-06}}</ref>
<code>getsebool</code>,<ref>{{cite web|url=http://linux.die.net/man/8/getsebool |title=getsebool(8): SELinux boolean value - Linux man page |publisher=Linux.die.net |access-date=2013-02-06}}</ref>
<code>setsebool</code>,<ref>{{cite web|url=http://linux.die.net/man/8/setsebool |title=setsebool(8): set SELinux boolean value - Linux man page |publisher=Linux.die.net |access-date=2013-02-06}}</ref>
<code>togglesebool</code><ref>{{cite web|url=http://linux.die.net/man/8/togglesebool |title=togglesebool(8) - Linux man page |publisher=Linux.die.net |access-date=2013-02-06}}</ref>
<code>setenforce</code>,
<code>semodule</code>,
<code>postfix-nochroot</code>,
<code>check-selinux-installation</code>,
<code>semodule_package</code>,
<code>checkmodule</code>,
<code>selinux-config-enforcing</code>,<ref>{{cite web |url=http://manpages.ubuntu.com/manpages/natty/man8/selinux-config-enforcing.8.html |title=Ubuntu Manpage: selinux-config-enforcing - change /etc/selinux/config to set enforcing |publisher=[[Canonical Ltd]] |access-date=2013-02-06 |url-status=dead |archive-url=https://web.archive.org/web/20121220020432/http://manpages.ubuntu.com/manpages/natty/man8/selinux-config-enforcing.8.html |archive-date=2012-12-20 }}</ref>
<code>selinuxenabled</code>,<ref>{{cite web |url=http://manpages.ubuntu.com/manpages/natty/man1/selinuxenabled.1.html |title=Ubuntu Manpage: selinuxenabled - tool to be used within shell scripts to determine if |publisher=[[Canonical Ltd]] |access-date=2013-02-06 |url-status=dead |archive-url=https://web.archive.org/web/20130209033811/http://manpages.ubuntu.com/manpages/natty/man1/selinuxenabled.1.html |archive-date=2013-02-09 }}</ref>
and <code>selinux-policy-upgrade</code><ref>{{cite web |url=http://manpages.ubuntu.com/manpages/natty/man8/selinux-policy-upgrade.8.html |title=Ubuntu Manpage: selinux-policy-upgrade - upgrade the modules in the SE Linux policy |publisher=[[Canonical Ltd]] |access-date=2013-02-06 |url-status=dead |archive-url=https://web.archive.org/web/20120404160143/http://manpages.ubuntu.com/manpages/natty/man8/selinux-policy-upgrade.8.html |archive-date=2012-04-04 }}</ref>

===Examples===
To put SELinux into enforcing mode:
:<code>setenforce 1</code>

To query the SELinux status:
:<code>getenforce</code>

==Comparison with AppArmor==
SELinux represents one of several possible approaches to the problem of restricting the actions that installed software can take. Another popular alternative is called [[AppArmor]] and is available on [[SUSE Linux Enterprise Server]] (SLES), [[openSUSE]], and [[List of Linux distributions#Debian-based|Debian-based]] platforms. AppArmor was developed as a component to the now-defunct [[Immunix|Immunix Linux]] platform. Because AppArmor and SELinux differ radically from one another, they form distinct alternatives for software control. Whereas SELinux re-invents certain concepts to provide access to a more expressive set of policy choices, AppArmor was designed to be simple by extending the same administrative semantics used for [[Discretionary Access Control|DAC]] up to the mandatory access control level.

There are several key differences:
* One important difference is that AppArmor identifies file system objects by path name instead of inode. This means that, for example, a file that is inaccessible may become accessible under AppArmor when a hard link is created to it, while SELinux would deny access through the newly created hard link.
** As a result, AppArmor can be said not to be a [[type enforcement]] system, as files are not assigned a type; instead, they are merely referenced in a configuration file.
* SELinux and AppArmor also differ significantly in how they are administered and how they integrate into the system.<ref>{{cite web | url= https://www.suse.com/documentation/sles11/book_security/data/sect1_chapter_book_security.html |publisher= SUSE |series= Security Guide |work= SELinux |title= SELinux backgrounds }}</ref>
* Since it endeavors to recreate traditional DAC controls with MAC-level enforcement, AppArmor's set of operations is also considerably smaller than those available under most SELinux implementations. For example, AppArmor's set of operations consist of: read, write, append, execute, lock, and link.<ref>{{cite web | url=http://manpages.ubuntu.com/manpages/hardy/man5/apparmor.d.5.html | title=apparmor.d - syntax of security profiles for AppArmor | url-status=dead | archive-url=https://web.archive.org/web/20131017094320/http://manpages.ubuntu.com/manpages/hardy/man5/apparmor.d.5.html | archive-date=2013-10-17 }}</ref> Most SELinux implementations will support numbers of operations orders of magnitude more than that. For example, SELinux will usually support those same permissions, but also includes controls for mknod, binding to network sockets, implicit use of POSIX capabilities, loading and unloading kernel modules, various means of accessing shared memory, etc.
* There are no controls in AppArmor for categorically bounding POSIX capabilities. Since the current implementation of capabilities contains no notion of a subject for the operation (only the actor and the operation) it is usually the job of the MAC layer to prevent privileged operations on files outside the actor's enforced realm of control (i.e. "Sandbox"). AppArmor can prevent its own policy from being altered, and prevent file systems from being mounted/unmounted, but does nothing to prevent users from stepping outside their approved realms of control.
** For example, it may be deemed beneficial for help desk employees to change ownership or permissions on certain files even if they don't own them (for example, on a departmental file share). The administrator does not want to give the user(s) root access on the box so they give them <code>CAP_FOWNER</code> or <code>CAP_DAC_OVERRIDE</code>. Under SELinux the administrator (or platform vendor) can configure SELinux to deny all capabilities to otherwise unconfined users, then create confined domains for the employee to be able to transition into after logging in, one that can exercise those capabilities, but only upon files of the appropriate type.{{Citation needed|date=April 2017}}
* There is no notion of multilevel security with AppArmor, thus there is no hard [[Bell–LaPadula model|BLP]] or [[Biba Model|Biba]] enforcement available.{{Citation needed|date=April 2017}}.
* AppArmor configuration is done using solely regular flat files. SELinux (by default in most implementations) uses a combination of flat files (used by administrators and developers to write human readable policy before it's compiled) and extended attributes.
* SELinux supports the concept of a "remote policy server" (configurable via /etc/selinux/semanage.conf) as an alternative source for policy configuration. Central management of AppArmor is usually complicated considerably since administrators must decide between configuration deployment tools being run as root (to allow policy updates) or configured manually on each server.

==Similar systems and enhancements==
{{See also|Samsung Knox}}

Isolation of processes can also be accomplished by mechanisms such as [[Operating system-level virtualization|virtualization]]; the [[OLPC]] project, for example, in its first implementation<ref>{{cite web|url=http://wiki.laptop.org/go/Rainbow|title=Rainbow|work=laptop.org}}</ref> [[Sandbox (computer security)|sandboxed]] individual applications in lightweight [[Vserver]]s. Also, the [[NSA]] has adopted some of the SELinux concepts in Security-Enhanced [[Android (operating system)|Android]].<ref>{{cite web |title=SELinux Related Work |work=NSA.gov |url=https://www.nsa.gov/what-we-do/research/selinux/related-work/ |access-date=2016-08-23 |archive-date=2018-02-20 |archive-url=https://web.archive.org/web/20180220212206/https://www.nsa.gov/what-we-do/research/selinux/related-work/ |url-status=dead }}</ref>

[[General Dynamics]] builds and distributes PitBull Trusted Operating System,<ref>{{cite web|url=https://gdmissionsystems.com/products/platform-security/pitbull-trusted-operating-system|title=PitBull Trusted Operating System|author=General Dynamics}}</ref> a [[multilevel security]] (MLS) enhancement for [[Red Hat Enterprise Linux]].

Multi-Category Security (MCS) is an enhancement to SELinux for [[Red Hat Enterprise Linux]] that allows users to label files with categories, in order to further restrict access through discretionary access control and type enforcement. Categories provide additional compartments within sensitivity levels used by [[multilevel security]] (MLS).<ref>{{cite web|url=https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/deployment_guide/sec-mcs-ov|title=49.4. Multi-Category Security (MCS)|author=Red Hat, Inc.}}</ref>


==See also==
==See also==
{{Portal|Linux}}
{{portalpar|Free software}}
*[[AppArmor]]
* {{annotated link|AppArmor}}
* {{annotated link|Astra Linux}}
*[[Capability (computers)|Capability]]
* {{annotated link|Red Star OS}}
*[[Comparison of Linux distributions]]
* {{annotated link|RSBAC|Rule Set Based Access Control (RSBAC)}}
*[[Computer security]]
* {{annotated link|Simplified Mandatory Access Control Kernel}}
*[[grsecurity]]
* {{annotated link|Solaris Trusted Extensions}}
*[[Linux]]
* {{annotated link|TOMOYO Linux|Tomoyo}}
*[[NSA]]
* {{annotated link|TrustedBSD}}
*[[RSBAC|Rule Set Based Access Control (RSBAC)]]
* {{annotated link|Unix security}}
*[[FreeBSD#TrustedBSD|TrustedBSD]]
* {{annotated link|Qubes OS}}


==Quotes==
==References==
{{Reflist|30em}}
*"Let me assure you that this action by the NSA was the crypto-equivalent of the [[Pope]] coming down off the balcony in Rome, working the crowd with a few loaves of bread and some fish, and then inviting everyone to come over to his place to watch the soccer game and have a few beers. There are some things that one just never expects to see, and the NSA handing out source code along with details of the security mechanism behind it was right up there on that list." &mdash;[[Larry Loeb]] [http://www-128.ibm.com/developerworks/library/s-selinux/?n-s-381]


==External links==
==External links==
* {{Official website|https://selinuxproject.org/}}
*[http://www.nsa.gov/selinux/ US National Security Agency's Security-Enhanced Linux website]
* [https://web.archive.org/web/20081018040612/https://www.nsa.gov/selinux/ Security-Enhanced Linux] at the [[National Security Agency]] in the [[Internet Archive]]
*[http://www.nsa.gov/releases/relea00027.cfm NSA press release: NSA shares security enhancements to Linux]
* {{Github|SELinuxProject/selinux|SELinux}}
*[http://www.nsa.gov/selinux/list-archive/0012/0000.cfm Mailing list announcement of availabilty]
* {{cite web |url= https://opensource.com/business/13/11/selinux-policy-guide |title= Visual how-to guide for SELinux policy enforcement |date= 13 Nov 2013 |first= Daniel J |last= Walsh |publisher= Opensource.com }}
*[http://selinux.sourceforge.net/ SELinux information for various Linux distributions]
*[http://freshmeat.net/projects/selinux/ FreshMeat's Security-Enhanced Linux project page]
*[http://www.crypt.gen.nz/selinux/faq.html UnOfficial SELinux FAQ]
*[http://www.coker.com.au/selinux/play.html SELinux demo machine -- Fedora-based]
*[http://selinux.dev.gentoo.org/ SELinux demo machine -- Gentoo-based]
*[http://www.TrustedBSD.org/sebsd.html SEBSD]
*[http://www.TrustedBSD.org/sedarwin.html SEDarwin]
*[http://www.rsbac.org RSBAC]
*[http://gentoo-wiki.com/Access_Control_Comparison_Table ACL for Linux comparison table]
*[http://selinuxnews.org/wp/ SELinux Community News Site]
*[http://selinuxnews.org/planet/ Planet SELinux - Blogs]
*[http://securityblog.org/brindle/ Security Blog by Joshua Brindle, some discussion of SELinux design aspects and motivations]


{{Linux kernel}}
[[Category:Operating system security]]
{{Linux}}

{{Authority control}}

[[Category:Linux kernel features]]
[[Category:Linux security software]]
[[Category:Linux security software]]
[[Category:National Security Agency]]
[[Category:National Security Agency]]
[[Category:Red Hat software]]

[[Category:Unix file system technology]]
[[de:SELinux]]
[[Category:Free software programmed in C]]
[[fr:SELinux]]
[[ja:SELinux]]
[[nl:Security-Enhanced Linux]]
[[pl:Security-Enhanced Linux]]
[[pt:SELinux]]
[[ru:SELinux]]
[[fi:SELinux]]

Latest revision as of 02:01, 25 July 2024

SELinux
Original author(s)NSA and Red Hat
Developer(s)Red Hat
Initial releaseDecember 22, 2000; 23 years ago (2000-12-22)[1]
Stable release
3.6 / 13 December 2023; 9 months ago (2023-12-13)[2]
Repository
Written inC
Operating systemLinux
TypeSecurity, Linux Security Modules (LSM)
LicenseGNU GPL
Websiteselinuxproject.org, https://www.nsa.gov/what-we-do/research/selinux/

Security-Enhanced Linux (SELinux) is a Linux kernel security module that provides a mechanism for supporting access control security policies, including mandatory access controls (MAC).

SELinux is a set of kernel modifications and user-space tools that have been added to various Linux distributions. Its architecture strives to separate enforcement of security decisions from the security policy, and streamlines the amount of software involved with security policy enforcement.[3][4] The key concepts underlying SELinux can be traced to several earlier projects by the United States National Security Agency (NSA).

Overview

[edit]

The NSA Security-enhanced Linux Team describes NSA SELinux as[5]

a set of patches to the Linux kernel and utilities to provide a strong, flexible, mandatory access control (MAC) architecture into the major subsystems of the kernel. It provides an enhanced mechanism to enforce the separation of information based on confidentiality and integrity requirements, which allows threats of tampering, and bypassing of application security mechanisms, to be addressed and enables the confinement of damage that can be caused by malicious or flawed applications. It includes a set of sample security policy configuration files designed to meet common, general-purpose security goals.

A Linux kernel integrating SELinux enforces mandatory access control policies that confine user programs and system services, as well as access to files and network resources. Limiting privilege to the minimum required to work reduces or eliminates the ability of these programs and daemons to cause harm if faulty or compromised (for example via buffer overflows or misconfigurations). This confinement mechanism operates independently of the traditional Linux (discretionary) access control mechanisms. It has no concept of a "root" superuser, and does not share the well-known shortcomings of the traditional Linux security mechanisms, such as a dependence on setuid/setgid binaries.

The security of an "unmodified" Linux system (a system without SELinux) depends on the correctness of the kernel, of all the privileged applications, and of each of their configurations. A fault in any one of these areas may allow the compromise of the entire system. In contrast, the security of a "modified" system (based on an SELinux kernel) depends primarily on the correctness of the kernel and its security-policy configuration. While problems with the correctness or configuration of applications may allow the limited compromise of individual user programs and system daemons, they do not necessarily pose a threat to the security of other user programs and system daemons or to the security of the system as a whole.

From a purist perspective, SELinux provides a hybrid of concepts and capabilities drawn from mandatory access controls, mandatory integrity controls, role-based access control (RBAC), and type enforcement architecture. Third-party tools enable one to build a variety of security policies.

History

[edit]

The earliest work directed toward standardizing an approach providing mandatory and discretionary access controls (MAC and DAC) within a UNIX (more precisely, POSIX) computing environment can be attributed to the National Security Agency's Trusted UNIX (TRUSIX) Working Group, which met from 1987 to 1991 and published one Rainbow Book (#020A), and produced a formal model and associated evaluation evidence prototype (#020B) that was ultimately unpublished.

SELinux was designed to demonstrate the value of mandatory access controls to the Linux community and how such controls could be added to Linux. Originally, the patches that make up SELinux had to be explicitly applied to the Linux kernel source; SELinux was merged into the Linux kernel mainline in the 2.6 series of the Linux kernel.

The NSA, the original primary developer of SELinux, released the first version to the open source development community under the GNU GPL on December 22, 2000.[6] The software was merged into the mainline Linux kernel 2.6.0-test3, released on 8 August 2003. Other significant contributors include Red Hat, Network Associates, Secure Computing Corporation, Tresys Technology, and Trusted Computer Solutions. Experimental ports of the FLASK/TE implementation have been made available via the TrustedBSD Project for the FreeBSD and Darwin operating systems.

Security-Enhanced Linux implements the Flux Advanced Security Kernel (FLASK). Such a kernel contains architectural components prototyped in the Fluke operating system. These provide general support for enforcing many kinds of mandatory access control policies, including those based on the concepts of type enforcement, role-based access control, and multilevel security. FLASK, in turn, was based on DTOS, a Mach-derived Distributed Trusted Operating System, as well as on Trusted Mach, a research project from Trusted Information Systems that had an influence on the design and implementation of DTOS.[citation needed]

Original and external contributors

[edit]

A comprehensive list of the original and external contributors to SELinux was hosted at the NSA website until maintenance ceased sometime in 2009. The following list reproduces the original as preserved by the Internet Archive Wayback Machine. The scope of their contributions was listed in the page and has been omitted for brevity, but it can be accessed through the archived copy.[7]

  • The National Security Agency (NSA)
  • Network Associates Laboratories (NAI Labs)
  • The MITRE Corporation
  • Secure Computing Corporation (SCC)
  • Matt Anderson
  • Ryan Bergauer
  • Bastian Blank
  • Thomas Bleher
  • Joshua Brindle
  • Russell Coker
  • John Dennis
  • Janak Desai
  • Ulrich Drepper
  • Lorenzo Hernandez Garcia-Hierro
  • Darrel Goeddel
  • Carsten Grohmann
  • Steve Grubb
  • Ivan Gyurdiev
  • Serge Hallyn
  • Chad Hanson
  • Joerg Hoh
  • Trent Jaeger
  • Dustin Kirkland
  • Kaigai Kohei
  • Paul Krumviede
  • Joy Latten
  • Tom London
  • Karl MacMillan
  • Brian May
  • Frank Mayer
  • Todd Miller
  • Roland McGrath
  • Paul Moore
  • James Morris
  • Yuichi Nakamura
  • Greg Norris
  • Eric Paris
  • Chris PeBenito
  • Red Hat
  • Petre Rodan
  • Shaun Savage
  • Chad Sellers
  • Rogelio Serrano Jr.
  • Justin Smith
  • Manoj Srivastava
  • Tresys Technology
  • Michael Thompson
  • Trusted Computer Solutions
  • Tom Vogt
  • Reino Wallin
  • Dan Walsh
  • Colin Walters
  • Mark Westerman
  • David A. Wheeler
  • Venkat Yekkirala
  • Catherine Zhang

Users, policies and security contexts

[edit]

SELinux users and roles do not have to be related to the actual system users and roles. For every current user or process, SELinux assigns a three string context consisting of a username, role, and domain (or type). This system is more flexible than normally required: as a rule, most of the real users share the same SELinux username, and all access control is managed through the third tag, the domain. The circumstances under which a process is allowed into a certain domain must be configured in the policies. The command runcon allows for the launching of a process into an explicitly specified context (user, role, and domain), but SELinux may deny the transition if it is not approved by the policy.

Files, network ports, and other hardware also have an SELinux context, consisting of a name, role (seldom used), and type. In the case of file systems, mapping between files and the security contexts is called labeling. The labeling is defined in policy files but can also be manually adjusted without changing the policies. Hardware types are quite detailed, for instance, bin_t (all files in the folder /bin) or postgresql_port_t (PostgreSQL port, 5432). The SELinux context for a remote file system can be specified explicitly at mount time.

SELinux adds the -Z switch to the shell commands ls, ps, and some others, allowing the security context of the files or process to be seen.

Typical policy rules consist of explicit permissions, for example, which domains the user must possess to perform certain actions with the given target (read, execute, or, in case of network port, bind or connect), and so on. More complex mappings are also possible, involving roles and security levels.

A typical policy consists of a mapping (labeling) file, a rule file, and an interface file, that define the domain transition. These three files must be compiled together with the SELinux tools to produce a single policy file. The resulting policy file can be loaded into the kernel to make it active. Loading and unloading policies does not require a reboot. The policy files are either hand written or can be generated from the more user friendly SELinux management tool. They are normally tested in permissive mode first, where violations are logged but allowed. The audit2allow tool can be used later to produce additional rules that extend the policy to allow all legitimate activities of the application being confined.

Features

[edit]

SELinux features include:

  • Clean separation of policy from enforcement
  • Well-defined policy interfaces
  • Support for applications querying the policy and enforcing access control (for example, crond running jobs in the correct context)
  • Independence of specific policies and policy languages
  • Independence of specific security-label formats and contents
  • Individual labels and controls for kernel objects and services
  • Support for policy changes
  • Separate measures for protecting system integrity (domain-type) and data confidentiality (multilevel security)
  • Flexible policy
  • Controls over process initialization and inheritance, and program execution
  • Controls over file systems, directories, files, and open file descriptors
  • Controls over sockets, messages, and network interfaces
  • Controls over the use of "capabilities"
  • Cached information on access-decisions via the Access Vector Cache (AVC)[8]
  • Default-deny policy (anything not explicitly specified in the policy is disallowed)[9][10][11]

Adoption

[edit]
sestatus showing status of SELinux in a system

SELinux has been implemented in Android since version 4.3.[12]

Among free community-supported Linux distributions, Fedora was one of the earliest adopters, including support for it by default since Fedora Core 2. Other distributions include support for it such as Debian as of version 9 Stretch release[13] and Ubuntu as of 8.04 Hardy Heron.[14] As of version 11.1, openSUSE contains SELinux "basic enablement".[15] SUSE Linux Enterprise 11 features SELinux as a "technology preview".[16]

SELinux is popular in systems based on linux containers, such as CoreOS Container Linux and rkt.[17] It is useful as an additional security control to help further enforce isolation between deployed containers and their host.

SELinux is available since 2005 as part of Red Hat Enterprise Linux (RHEL) version 4 and all future releases. This presence is also reflected in corresponding versions of derived systems such as CentOS, Scientific Linux, AlmaLinux and Rocky Linux. The supported policy in RHEL4 is targeted policy which aims for maximum ease of use and thus is not as restrictive as it might be. Future versions of RHEL are planned to have more targets in the targeted policy which will mean more restrictive policies.

Use case scenarios

[edit]

SELinux can potentially control which activities a system allows each user, process, and daemon, with very precise specifications. It is used to confine daemons such as database engines or web servers that have clearly defined data access and activity rights. This limits potential harm from a confined daemon that becomes compromised.

Command-line utilities include:[18] chcon,[19] restorecon,[20] restorecond,[21] runcon,[22] secon,[23] fixfiles,[24] setfiles,[25] load_policy,[26] booleans,[27] getsebool,[28] setsebool,[29] togglesebool[30] setenforce, semodule, postfix-nochroot, check-selinux-installation, semodule_package, checkmodule, selinux-config-enforcing,[31] selinuxenabled,[32] and selinux-policy-upgrade[33]

Examples

[edit]

To put SELinux into enforcing mode:

setenforce 1

To query the SELinux status:

getenforce

Comparison with AppArmor

[edit]

SELinux represents one of several possible approaches to the problem of restricting the actions that installed software can take. Another popular alternative is called AppArmor and is available on SUSE Linux Enterprise Server (SLES), openSUSE, and Debian-based platforms. AppArmor was developed as a component to the now-defunct Immunix Linux platform. Because AppArmor and SELinux differ radically from one another, they form distinct alternatives for software control. Whereas SELinux re-invents certain concepts to provide access to a more expressive set of policy choices, AppArmor was designed to be simple by extending the same administrative semantics used for DAC up to the mandatory access control level.

There are several key differences:

  • One important difference is that AppArmor identifies file system objects by path name instead of inode. This means that, for example, a file that is inaccessible may become accessible under AppArmor when a hard link is created to it, while SELinux would deny access through the newly created hard link.
    • As a result, AppArmor can be said not to be a type enforcement system, as files are not assigned a type; instead, they are merely referenced in a configuration file.
  • SELinux and AppArmor also differ significantly in how they are administered and how they integrate into the system.[34]
  • Since it endeavors to recreate traditional DAC controls with MAC-level enforcement, AppArmor's set of operations is also considerably smaller than those available under most SELinux implementations. For example, AppArmor's set of operations consist of: read, write, append, execute, lock, and link.[35] Most SELinux implementations will support numbers of operations orders of magnitude more than that. For example, SELinux will usually support those same permissions, but also includes controls for mknod, binding to network sockets, implicit use of POSIX capabilities, loading and unloading kernel modules, various means of accessing shared memory, etc.
  • There are no controls in AppArmor for categorically bounding POSIX capabilities. Since the current implementation of capabilities contains no notion of a subject for the operation (only the actor and the operation) it is usually the job of the MAC layer to prevent privileged operations on files outside the actor's enforced realm of control (i.e. "Sandbox"). AppArmor can prevent its own policy from being altered, and prevent file systems from being mounted/unmounted, but does nothing to prevent users from stepping outside their approved realms of control.
    • For example, it may be deemed beneficial for help desk employees to change ownership or permissions on certain files even if they don't own them (for example, on a departmental file share). The administrator does not want to give the user(s) root access on the box so they give them CAP_FOWNER or CAP_DAC_OVERRIDE. Under SELinux the administrator (or platform vendor) can configure SELinux to deny all capabilities to otherwise unconfined users, then create confined domains for the employee to be able to transition into after logging in, one that can exercise those capabilities, but only upon files of the appropriate type.[citation needed]
  • There is no notion of multilevel security with AppArmor, thus there is no hard BLP or Biba enforcement available.[citation needed].
  • AppArmor configuration is done using solely regular flat files. SELinux (by default in most implementations) uses a combination of flat files (used by administrators and developers to write human readable policy before it's compiled) and extended attributes.
  • SELinux supports the concept of a "remote policy server" (configurable via /etc/selinux/semanage.conf) as an alternative source for policy configuration. Central management of AppArmor is usually complicated considerably since administrators must decide between configuration deployment tools being run as root (to allow policy updates) or configured manually on each server.

Similar systems and enhancements

[edit]

Isolation of processes can also be accomplished by mechanisms such as virtualization; the OLPC project, for example, in its first implementation[36] sandboxed individual applications in lightweight Vservers. Also, the NSA has adopted some of the SELinux concepts in Security-Enhanced Android.[37]

General Dynamics builds and distributes PitBull Trusted Operating System,[38] a multilevel security (MLS) enhancement for Red Hat Enterprise Linux.

Multi-Category Security (MCS) is an enhancement to SELinux for Red Hat Enterprise Linux that allows users to label files with categories, in order to further restrict access through discretionary access control and type enforcement. Categories provide additional compartments within sensitivity levels used by multilevel security (MLS).[39]

See also

[edit]

References

[edit]
  1. ^ "Security-enhanced Linux available at NSA site - MARC". MARC. Retrieved 24 December 2018.
  2. ^ "SELinux userspace release 3.6". SELinux Project. 2023-12-14. Retrieved 2024-03-16.
  3. ^ "SELinux Frequently Asked Questions (FAQ) - NSA/CSS". National Security Agency. Archived from the original on 2018-09-18. Retrieved 2013-02-06.
  4. ^ Loscocco, Peter; Smalley, Stephen (February 2001). "Integrating Flexible Support for Security Policies into the Linux Operating System" (PDF).
  5. ^ "Security-Enhanced Linux - NSA/CSS". National Security Agency. 2009-01-15. Archived from the original on 2020-10-22. Retrieved 2021-04-21.
  6. ^ Compare "National Security Agency Shares Security Enhancements to Linux". NSA Press Release. Fort George G. Meade, Maryland: National Security Agency Central Security Service. 2001-01-02. Archived from the original on 2018-09-18. Retrieved 2021-04-21. The NSA is pleased to announce that it has developed, and is making available to the public, a prototype version of a security-enhanced Linux operating system.
  7. ^ "Contributors to SELinux". Archived from the original on 2008-10-18.
  8. ^ Fedora Documentation Project (2010). Fedora 13 Security-Enhanced Linux User Guide. Fultus Corporation. p. 18. ISBN 978-1-59682-215-3. Retrieved 2012-02-22. SELinux decisions, such as allowing or disallowing access, are cached. This cache is known as the Access Vector Cache (AVC). Caching decisions decreases how often SELinux rules need to checked, which increases performance.
  9. ^ "SELinux/Quick introduction - Gentoo Wiki". wiki.gentoo.org.
  10. ^ "Getting Started with SELinux". Linode Guides & Tutorials.
  11. ^ "NB Overview - SELinux Wiki". selinuxproject.org.
  12. ^ "Security-Enhanced Linux in Android". Android Open Source Project. Retrieved 2016-01-31.
  13. ^ "SELinux". debian.org.
  14. ^ "How To Install SELinux on Ubuntu 8.04 "Hardy Heron"". Ubuntu Tutorials.
  15. ^ "openSUSE News". 20 August 2008.
  16. ^ "Release Notes for SUSE Linux Enterprise Desktop 11". Novell. Retrieved 2013-02-06.
  17. ^ "SELinux on CoreOS". CoreOS Docs.
  18. ^ "SELinux/Commands - FedoraProject". Retrieved 2015-11-25.
  19. ^ "chcon". Linuxcommand.org. Archived from the original on 2004-10-24. Retrieved 2013-02-06.
  20. ^ "restorecon(8) - Linux man page". Linux.die.net. Retrieved 2013-02-06.
  21. ^ "restorecond(8) - Linux man page". Linux.die.net. Retrieved 2013-02-06.
  22. ^ "runcon(1) - Linux man page". Linux.die.net. Retrieved 2013-02-06.
  23. ^ "secon(1) - Linux man page". Linux.die.net. Retrieved 2013-02-06.
  24. ^ "fixfiles(8): fix file SELinux security contexts - Linux man page". Linux.die.net. Retrieved 2013-02-06.
  25. ^ "setfiles(8): set file SELinux security contexts - Linux man page". Linux.die.net. Retrieved 2013-02-06.
  26. ^ "load_policy(8) - Linux man page". Linux.die.net. Retrieved 2013-02-06.
  27. ^ "booleans(8) - Linux man page". Linux.die.net. Retrieved 2013-02-06.
  28. ^ "getsebool(8): SELinux boolean value - Linux man page". Linux.die.net. Retrieved 2013-02-06.
  29. ^ "setsebool(8): set SELinux boolean value - Linux man page". Linux.die.net. Retrieved 2013-02-06.
  30. ^ "togglesebool(8) - Linux man page". Linux.die.net. Retrieved 2013-02-06.
  31. ^ "Ubuntu Manpage: selinux-config-enforcing - change /etc/selinux/config to set enforcing". Canonical Ltd. Archived from the original on 2012-12-20. Retrieved 2013-02-06.
  32. ^ "Ubuntu Manpage: selinuxenabled - tool to be used within shell scripts to determine if". Canonical Ltd. Archived from the original on 2013-02-09. Retrieved 2013-02-06.
  33. ^ "Ubuntu Manpage: selinux-policy-upgrade - upgrade the modules in the SE Linux policy". Canonical Ltd. Archived from the original on 2012-04-04. Retrieved 2013-02-06.
  34. ^ "SELinux backgrounds". SELinux. Security Guide. SUSE.
  35. ^ "apparmor.d - syntax of security profiles for AppArmor". Archived from the original on 2013-10-17.
  36. ^ "Rainbow". laptop.org.
  37. ^ "SELinux Related Work". NSA.gov. Archived from the original on 2018-02-20. Retrieved 2016-08-23.
  38. ^ General Dynamics. "PitBull Trusted Operating System".
  39. ^ Red Hat, Inc. "49.4. Multi-Category Security (MCS)".
[edit]