<s>
Security-Enhanced	B-Application
Linux	I-Application
(	O
SELinux	B-Application
)	O
is	O
a	O
Linux	B-Operating_System
kernel	I-Operating_System
security	B-Application
module	I-Application
that	O
provides	O
a	O
mechanism	O
for	O
supporting	O
access	O
control	O
security	O
policies	O
,	O
including	O
mandatory	O
access	O
controls	O
(	O
MAC	O
)	O
.	O
</s>
<s>
SELinux	B-Application
is	O
a	O
set	O
of	O
kernel	B-Operating_System
modifications	O
and	O
user-space	O
tools	O
that	O
have	O
been	O
added	O
to	O
various	O
Linux	B-Application
distributions	I-Application
.	O
</s>
<s>
Its	O
architecture	B-Architecture
strives	O
to	O
separate	O
enforcement	O
of	O
security	O
decisions	O
from	O
the	O
security	O
policy	O
,	O
and	O
streamlines	O
the	O
amount	O
of	O
software	O
involved	O
with	O
security	O
policy	O
enforcement	O
.	O
</s>
<s>
The	O
key	O
concepts	O
underlying	O
SELinux	B-Application
can	O
be	O
traced	O
to	O
several	O
earlier	O
projects	O
by	O
the	O
United	O
States	O
National	O
Security	O
Agency	O
(	O
NSA	O
)	O
.	O
</s>
<s>
a	O
set	O
of	O
patches	O
to	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
and	O
utilities	O
to	O
provide	O
a	O
strong	O
,	O
flexible	O
,	O
mandatory	O
access	O
control	O
(	O
MAC	O
)	O
architecture	B-Architecture
into	O
the	O
major	O
subsystems	O
of	O
the	O
kernel	B-Operating_System
.	O
</s>
<s>
A	O
Linux	B-Operating_System
kernel	I-Operating_System
integrating	O
SELinux	B-Application
enforces	O
mandatory	O
access	O
control	O
policies	O
that	O
confine	O
user	O
programs	O
and	O
system	O
services	O
,	O
as	O
well	O
as	O
access	O
to	O
files	O
and	O
network	O
resources	O
.	O
</s>
<s>
Limiting	O
privilege	O
to	O
the	O
minimum	O
required	O
to	O
work	O
reduces	O
or	O
eliminates	O
the	O
ability	O
of	O
these	O
programs	O
and	O
daemons	B-Operating_System
to	O
cause	O
harm	O
if	O
faulty	O
or	O
compromised	O
(	O
for	O
example	O
via	O
buffer	B-General_Concept
overflows	I-General_Concept
or	O
misconfigurations	O
)	O
.	O
</s>
<s>
This	O
confinement	O
mechanism	O
operates	O
independently	O
of	O
the	O
traditional	O
Linux	B-Operating_System
(	O
discretionary	O
)	O
access	O
control	O
mechanisms	O
.	O
</s>
<s>
It	O
has	O
no	O
concept	O
of	O
a	O
"	O
root	O
"	O
superuser	B-Application
,	O
and	O
does	O
not	O
share	O
the	O
well-known	O
shortcomings	O
of	O
the	O
traditional	O
Linux	B-Operating_System
security	O
mechanisms	O
,	O
such	O
as	O
a	O
dependence	O
on	O
setuid/setgid	O
binaries	O
.	O
</s>
<s>
The	O
security	O
of	O
an	O
"	O
unmodified	O
"	O
Linux	B-Operating_System
system	O
(	O
a	O
system	O
without	O
SELinux	B-Application
)	O
depends	O
on	O
the	O
correctness	O
of	O
the	O
kernel	B-Operating_System
,	O
of	O
all	O
the	O
privileged	O
applications	O
,	O
and	O
of	O
each	O
of	O
their	O
configurations	O
.	O
</s>
<s>
In	O
contrast	O
,	O
the	O
security	O
of	O
a	O
"	O
modified	O
"	O
system	O
(	O
based	O
on	O
an	O
SELinux	B-Application
kernel	B-Operating_System
)	O
depends	O
primarily	O
on	O
the	O
correctness	O
of	O
the	O
kernel	B-Operating_System
and	O
its	O
security-policy	O
configuration	O
.	O
</s>
<s>
While	O
problems	O
with	O
the	O
correctness	O
or	O
configuration	O
of	O
applications	O
may	O
allow	O
the	O
limited	O
compromise	O
of	O
individual	O
user	O
programs	O
and	O
system	B-Operating_System
daemons	I-Operating_System
,	O
they	O
do	O
not	O
necessarily	O
pose	O
a	O
threat	O
to	O
the	O
security	O
of	O
other	O
user	O
programs	O
and	O
system	B-Operating_System
daemons	I-Operating_System
or	O
to	O
the	O
security	O
of	O
the	O
system	O
as	O
a	O
whole	O
.	O
</s>
<s>
From	O
a	O
purist	O
perspective	O
,	O
SELinux	B-Application
provides	O
a	O
hybrid	O
of	O
concepts	O
and	O
capabilities	O
drawn	O
from	O
mandatory	O
access	O
controls	O
,	O
mandatory	O
integrity	O
controls	O
,	O
role-based	O
access	O
control	O
(	O
RBAC	O
)	O
,	O
and	O
type	O
enforcement	O
architecture	B-Architecture
.	O
</s>
<s>
SELinux	B-Application
was	O
designed	O
to	O
demonstrate	O
the	O
value	O
of	O
mandatory	O
access	O
controls	O
to	O
the	O
Linux	B-Operating_System
community	O
and	O
how	O
such	O
controls	O
could	O
be	O
added	O
to	O
Linux	B-Operating_System
.	O
</s>
<s>
Originally	O
,	O
the	O
patches	O
that	O
make	O
up	O
SELinux	B-Application
had	O
to	O
be	O
explicitly	O
applied	O
to	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
source	O
;	O
SELinux	B-Application
was	O
merged	O
into	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
mainline	O
in	O
the	O
2.6	O
series	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
.	O
</s>
<s>
The	O
NSA	O
,	O
the	O
original	O
primary	O
developer	O
of	O
SELinux	B-Application
,	O
released	O
the	O
first	O
version	O
to	O
the	O
open	B-Application
source	I-Application
development	O
community	O
under	O
the	O
GNU	B-License
GPL	I-License
on	O
December	O
22	O
,	O
2000	O
.	O
</s>
<s>
Experimental	O
ports	O
of	O
the	O
FLASK/TE	O
implementation	O
have	O
been	O
made	O
available	O
via	O
the	O
TrustedBSD	O
Project	O
for	O
the	O
FreeBSD	B-Operating_System
and	O
Darwin	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
.	O
</s>
<s>
Security-Enhanced	B-Application
Linux	I-Application
implements	O
the	O
Flux	B-Language
Advanced	I-Language
Security	I-Language
Kernel	I-Language
(	O
FLASK	B-Language
)	O
.	O
</s>
<s>
Such	O
a	O
kernel	B-Operating_System
contains	O
architectural	O
components	O
prototyped	O
in	O
the	O
Fluke	O
operating	O
system	O
.	O
</s>
<s>
FLASK	B-Language
,	O
in	O
turn	O
,	O
was	O
based	O
on	O
DTOS	O
,	O
a	O
Mach-derived	O
Distributed	O
Trusted	O
Operating	O
System	O
,	O
as	O
well	O
as	O
on	O
Trusted	O
Mach	O
,	O
a	O
research	O
project	O
from	O
Trusted	O
Information	O
Systems	O
that	O
had	O
an	O
influence	O
on	O
the	O
design	O
and	O
implementation	O
of	O
DTOS	O
.	O
</s>
<s>
A	O
comprehensive	O
list	O
of	O
the	O
original	O
and	O
external	O
contributors	O
to	O
SELinux	B-Application
was	O
hosted	O
at	O
the	O
NSA	O
website	O
until	O
maintenance	O
ceased	O
sometime	O
in	O
2009	O
.	O
</s>
<s>
SELinux	B-Application
users	O
and	O
roles	O
do	O
not	O
have	O
to	O
be	O
related	O
to	O
the	O
actual	O
system	O
users	O
and	O
roles	O
.	O
</s>
<s>
For	O
every	O
current	O
user	O
or	O
process	O
,	O
SELinux	B-Application
assigns	O
a	O
three	O
string	O
context	O
consisting	O
of	O
a	O
username	O
,	O
role	O
,	O
and	O
domain	O
(	O
or	O
type	O
)	O
.	O
</s>
<s>
This	O
system	O
is	O
more	O
flexible	O
than	O
normally	O
required	O
:	O
as	O
a	O
rule	O
,	O
most	O
of	O
the	O
real	O
users	O
share	O
the	O
same	O
SELinux	B-Application
username	O
,	O
and	O
all	O
access	O
control	O
is	O
managed	O
through	O
the	O
third	O
tag	O
,	O
the	O
domain	O
.	O
</s>
<s>
The	O
command	O
runcon	O
allows	O
for	O
the	O
launching	O
of	O
a	O
process	O
into	O
an	O
explicitly	O
specified	O
context	O
(	O
user	O
,	O
role	O
,	O
and	O
domain	O
)	O
,	O
but	O
SELinux	B-Application
may	O
deny	O
the	O
transition	O
if	O
it	O
is	O
not	O
approved	O
by	O
the	O
policy	O
.	O
</s>
<s>
Files	O
,	O
network	O
ports	O
,	O
and	O
other	O
hardware	O
also	O
have	O
an	O
SELinux	B-Application
context	O
,	O
consisting	O
of	O
a	O
name	O
,	O
role	O
(	O
seldom	O
used	O
)	O
,	O
and	O
type	O
.	O
</s>
<s>
The	O
SELinux	B-Application
context	O
for	O
a	O
remote	O
file	O
system	O
can	O
be	O
specified	O
explicitly	O
at	O
mount	O
time	O
.	O
</s>
<s>
SELinux	B-Application
adds	O
the	O
-Z	O
switch	O
to	O
the	O
shell	O
commands	O
ls	O
,	O
ps	O
,	O
and	O
some	O
others	O
,	O
allowing	O
the	O
security	O
context	O
of	O
the	O
files	O
or	O
process	O
to	O
be	O
seen	O
.	O
</s>
<s>
These	O
three	O
files	O
must	O
be	O
compiled	O
together	O
with	O
the	O
SELinux	B-Application
tools	O
to	O
produce	O
a	O
single	O
policy	O
file	O
.	O
</s>
<s>
The	O
resulting	O
policy	O
file	O
can	O
be	O
loaded	O
into	O
the	O
kernel	B-Operating_System
to	O
make	O
it	O
active	O
.	O
</s>
<s>
The	O
policy	O
files	O
are	O
either	O
hand	O
written	O
or	O
can	O
be	O
generated	O
from	O
the	O
more	O
user	O
friendly	O
SELinux	B-Application
management	O
tool	O
.	O
</s>
<s>
SELinux	B-Application
features	O
include	O
:	O
</s>
<s>
SELinux	B-Application
has	O
been	O
implemented	O
in	O
Android	B-Application
since	O
version	O
4.3	O
.	O
</s>
<s>
Among	O
free	O
community-supported	O
Linux	B-Application
distributions	I-Application
,	O
Fedora	O
was	O
one	O
of	O
the	O
earliest	O
adopters	O
,	O
including	O
support	O
for	O
it	O
by	O
default	O
since	O
Fedora	O
Core	O
2	O
.	O
</s>
<s>
Other	O
distributions	O
include	O
support	O
for	O
it	O
such	O
as	O
Debian	O
as	O
of	O
version	O
9	O
Stretch	O
release	O
and	O
Ubuntu	B-Operating_System
as	O
of	O
8.04	O
Hardy	O
Heron	O
.	O
</s>
<s>
As	O
of	O
version	O
11.1	O
,	O
openSUSE	B-Operating_System
contains	O
SELinux	B-Application
"	O
basic	O
enablement	O
"	O
.	O
</s>
<s>
SUSE	O
Linux	B-Operating_System
Enterprise	O
11	O
features	O
SELinux	B-Application
as	O
a	O
"	O
technology	O
preview	O
"	O
.	O
</s>
<s>
SELinux	B-Application
is	O
popular	O
in	O
systems	O
based	O
on	O
linux	B-Operating_System
containers	B-Application
,	O
such	O
as	O
CoreOS	B-Application
Container	I-Application
Linux	I-Application
and	O
rkt	O
.	O
</s>
<s>
It	O
is	O
useful	O
as	O
an	O
additional	O
security	O
control	O
to	O
help	O
further	O
enforce	O
isolation	O
between	O
deployed	O
containers	B-Application
and	O
their	O
host	O
.	O
</s>
<s>
SELinux	B-Application
is	O
available	O
since	O
2005	O
as	O
part	O
of	O
Red	O
Hat	O
Enterprise	O
Linux	B-Operating_System
(	O
RHEL	O
)	O
version	O
4	O
and	O
all	O
future	O
releases	O
.	O
</s>
<s>
This	O
presence	O
is	O
also	O
reflected	O
in	O
corresponding	O
versions	O
of	O
CentOS	O
and	O
Scientific	B-Application
Linux	I-Application
.	O
</s>
<s>
SELinux	B-Application
can	O
potentially	O
control	O
which	O
activities	O
a	O
system	O
allows	O
each	O
user	O
,	O
process	O
,	O
and	O
daemon	B-Operating_System
,	O
with	O
very	O
precise	O
specifications	O
.	O
</s>
<s>
It	O
is	O
used	O
to	O
confine	O
daemons	B-Operating_System
such	O
as	O
database	O
engines	O
or	O
web	O
servers	O
that	O
have	O
clearly	O
defined	O
data	O
access	O
and	O
activity	O
rights	O
.	O
</s>
<s>
This	O
limits	O
potential	O
harm	O
from	O
a	O
confined	O
daemon	B-Operating_System
that	O
becomes	O
compromised	O
.	O
</s>
<s>
check-selinux-installation	O
,	O
</s>
<s>
selinux-config-enforcing	O
,	O
</s>
<s>
To	O
put	O
SELinux	B-Application
into	O
enforcing	O
mode	O
:	O
</s>
<s>
To	O
query	O
the	O
SELinux	B-Application
status	O
:	O
</s>
<s>
SELinux	B-Application
represents	O
one	O
of	O
several	O
possible	O
approaches	O
to	O
the	O
problem	O
of	O
restricting	O
the	O
actions	O
that	O
installed	O
software	O
can	O
take	O
.	O
</s>
<s>
Another	O
popular	O
alternative	O
is	O
called	O
AppArmor	O
and	O
is	O
available	O
on	O
SUSE	O
Linux	B-Operating_System
Enterprise	O
Server	O
(	O
SLES	O
)	O
,	O
openSUSE	B-Operating_System
,	O
and	O
Debian-based	O
platforms	O
.	O
</s>
<s>
AppArmor	O
was	O
developed	O
as	O
a	O
component	O
to	O
the	O
now-defunct	O
Immunix	O
Linux	B-Operating_System
platform	O
.	O
</s>
<s>
Because	O
AppArmor	O
and	O
SELinux	B-Application
differ	O
radically	O
from	O
one	O
another	O
,	O
they	O
form	O
distinct	O
alternatives	O
for	O
software	O
control	O
.	O
</s>
<s>
Whereas	O
SELinux	B-Application
re-invents	O
certain	O
concepts	O
to	O
provide	O
access	O
to	O
a	O
more	O
expressive	O
set	O
of	O
policy	O
choices	O
,	O
AppArmor	O
was	O
designed	O
to	O
be	O
simple	O
by	O
extending	O
the	O
same	O
administrative	O
semantics	O
used	O
for	O
DAC	O
up	O
to	O
the	O
mandatory	O
access	O
control	O
level	O
.	O
</s>
<s>
This	O
means	O
that	O
,	O
for	O
example	O
,	O
a	O
file	O
that	O
is	O
inaccessible	O
may	O
become	O
accessible	O
under	O
AppArmor	O
when	O
a	O
hard	O
link	O
is	O
created	O
to	O
it	O
,	O
while	O
SELinux	B-Application
would	O
deny	O
access	O
through	O
the	O
newly	O
created	O
hard	O
link	O
.	O
</s>
<s>
SELinux	B-Application
and	O
AppArmor	O
also	O
differ	O
significantly	O
in	O
how	O
they	O
are	O
administered	O
and	O
how	O
they	O
integrate	O
into	O
the	O
system	O
.	O
</s>
<s>
Since	O
it	O
endeavors	O
to	O
recreate	O
traditional	O
DAC	O
controls	O
with	O
MAC-level	O
enforcement	O
,	O
AppArmor	O
's	O
set	O
of	O
operations	O
is	O
also	O
considerably	O
smaller	O
than	O
those	O
available	O
under	O
most	O
SELinux	B-Application
implementations	O
.	O
</s>
<s>
Most	O
SELinux	B-Application
implementations	O
will	O
support	O
numbers	O
of	O
operations	O
orders	O
of	O
magnitude	O
more	O
than	O
that	O
.	O
</s>
<s>
For	O
example	O
,	O
SELinux	B-Application
will	O
usually	O
support	O
those	O
same	O
permissions	O
,	O
but	O
also	O
includes	O
controls	O
for	O
mknod	O
,	O
binding	O
to	O
network	O
sockets	O
,	O
implicit	O
use	O
of	O
POSIX	O
capabilities	O
,	O
loading	O
and	O
unloading	O
kernel	B-Operating_System
modules	O
,	O
various	O
means	O
of	O
accessing	O
shared	O
memory	O
,	O
etc	O
.	O
</s>
<s>
The	O
administrator	O
does	O
not	O
want	O
to	O
give	O
the	O
user(s )	O
root	B-Application
access	I-Application
on	O
the	O
box	O
so	O
they	O
give	O
them	O
CAP_FOWNER	O
or	O
CAP_DAC_OVERRIDE	O
.	O
</s>
<s>
Under	O
SELinux	B-Application
the	O
administrator	O
(	O
or	O
platform	O
vendor	O
)	O
can	O
configure	O
SELinux	B-Application
to	O
deny	O
all	O
capabilities	O
to	O
otherwise	O
unconfined	O
users	O
,	O
then	O
create	O
confined	O
domains	O
for	O
the	O
employee	O
to	O
be	O
able	O
to	O
transition	O
into	O
after	O
logging	O
in	O
,	O
one	O
that	O
can	O
exercise	O
those	O
capabilities	O
,	O
but	O
only	O
upon	O
files	O
of	O
the	O
appropriate	O
type	O
.	O
</s>
<s>
SELinux	B-Application
(	O
by	O
default	O
in	O
most	O
implementations	O
)	O
uses	O
a	O
combination	O
of	O
flat	O
files	O
(	O
used	O
by	O
administrators	O
and	O
developers	O
to	O
write	O
human	O
readable	O
policy	O
before	O
it	O
's	O
compiled	O
)	O
and	O
extended	O
attributes	O
.	O
</s>
<s>
SELinux	B-Application
supports	O
the	O
concept	O
of	O
a	O
"	O
remote	O
policy	O
server	O
"	O
(	O
configurable	O
via	O
/etc/selinux/semanage.conf	O
)	O
as	O
an	O
alternative	O
source	O
for	O
policy	O
configuration	O
.	O
</s>
<s>
Isolation	O
of	O
processes	O
can	O
also	O
be	O
accomplished	O
by	O
mechanisms	O
such	O
as	O
virtualization	B-Application
;	O
the	O
OLPC	O
project	O
,	O
for	O
example	O
,	O
in	O
its	O
first	O
implementation	O
sandboxed	O
individual	O
applications	O
in	O
lightweight	O
Vservers	O
.	O
</s>
<s>
Also	O
,	O
the	O
NSA	O
has	O
adopted	O
some	O
of	O
the	O
SELinux	B-Application
concepts	O
in	O
Security-Enhanced	O
Android	B-Application
.	O
</s>
<s>
General	O
Dynamics	O
builds	O
and	O
distributes	O
PitBull	O
Trusted	O
Operating	O
System	O
,	O
a	O
multilevel	O
security	O
(	O
MLS	O
)	O
enhancement	O
for	O
Red	O
Hat	O
Enterprise	O
Linux	B-Operating_System
.	O
</s>
<s>
Multi-Category	O
Security	O
(	O
MCS	O
)	O
is	O
an	O
enhancement	O
to	O
SELinux	B-Application
for	O
Red	O
Hat	O
Enterprise	O
Linux	B-Operating_System
that	O
allows	O
users	O
to	O
label	O
files	O
with	O
categories	O
,	O
in	O
order	O
to	O
further	O
restrict	O
access	O
through	O
discretionary	O
access	O
control	O
and	O
type	O
enforcement	O
.	O
</s>
