<s>
Linux	B-Application
Security	I-Application
Modules	I-Application
(	O
LSM	O
)	O
is	O
a	O
framework	B-Architecture
allowing	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
to	O
support	O
without	O
bias	O
a	O
variety	O
of	O
computer	O
security	O
models	O
.	O
</s>
<s>
LSM	O
is	O
licensed	O
under	O
the	O
terms	O
of	O
the	O
GNU	B-License
General	I-License
Public	I-License
License	I-License
and	O
is	O
a	O
standard	O
part	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
since	O
Linux	B-Operating_System
2.6	I-Operating_System
.	O
</s>
<s>
AppArmor	O
,	O
SELinux	B-Application
,	O
Smack	B-Application
,	O
and	O
TOMOYO	O
Linux	B-Operating_System
are	O
the	O
currently	O
approved	O
security	O
modules	B-Application
in	O
the	O
official	O
kernel	B-Operating_System
.	O
</s>
<s>
LSM	O
was	O
designed	O
in	O
order	O
to	O
answer	O
all	O
the	O
requirements	O
for	O
successfully	O
implementing	O
a	O
mandatory	O
access	O
control	O
module	B-Application
,	O
while	O
imposing	O
the	O
fewest	O
possible	O
changes	O
to	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
.	O
</s>
<s>
LSM	O
avoids	O
the	O
approach	O
of	O
system	O
call	O
interposition	O
used	O
by	O
Systrace	B-Application
because	O
it	O
does	O
n't	O
scale	O
to	O
multiprocessor	B-Operating_System
kernels	B-Operating_System
and	O
is	O
subject	O
to	O
TOCTTOU	B-Error_Name
(	O
race	O
)	O
attacks	O
.	O
</s>
<s>
Instead	O
,	O
LSM	O
inserts	O
"	O
hooks	O
"	O
(	O
upcalls	O
to	O
the	O
module	B-Application
)	O
at	O
every	O
point	O
in	O
the	O
kernel	B-Operating_System
where	O
a	O
user-level	O
system-call	O
is	O
about	O
to	O
result	O
with	O
an	O
access	O
to	O
an	O
important	O
internal	O
kernel-object	O
like	O
inodes	O
and	O
task	O
control	O
blocks	O
.	O
</s>
<s>
LSM	O
is	O
narrowly	O
scoped	O
to	O
solve	O
the	O
problem	O
of	O
access	O
control	O
,	O
while	O
not	O
imposing	O
a	O
large	O
and	O
complex	O
change-patch	O
on	O
the	O
mainstream	O
kernel	B-Operating_System
.	O
</s>
<s>
It	O
is	O
n't	O
intended	O
to	O
be	O
a	O
general	O
"	O
hook	O
"	O
or	O
"	O
upcall	O
"	O
mechanism	O
,	O
nor	O
does	O
it	O
support	O
Operating	B-Application
system-level	I-Application
virtualization	I-Application
.	O
</s>
<s>
LSM	O
cannot	O
deliver	O
this	O
,	O
because	O
it	O
would	O
require	O
a	O
great	O
many	O
more	O
hooks	O
,	O
in	O
order	O
to	O
detect	O
cases	O
where	O
the	O
kernel	B-Operating_System
"	O
short	O
circuits	O
"	O
failing	O
system-calls	O
and	O
returns	O
an	O
error	O
code	O
before	O
getting	O
near	O
significant	O
objects	O
.	O
</s>
<s>
The	O
LSM	O
design	O
is	O
described	O
in	O
the	O
paper	O
Linux	B-Application
Security	I-Application
Modules	I-Application
:	O
General	O
Security	O
Support	O
for	O
the	O
Linux	B-Operating_System
Kernel	I-Operating_System
presented	O
at	O
USENIX	O
Security	O
2002	O
.	O
</s>
<s>
At	O
the	O
same	O
conference	O
was	O
the	O
paper	O
Using	O
CQUAL	O
for	O
Static	O
Analysis	O
of	O
Authorization	O
Hook	O
Placement	O
which	O
studied	O
automatic	O
static	O
analysis	O
of	O
the	O
kernel	B-Operating_System
code	O
to	O
verify	O
that	O
all	O
of	O
the	O
necessary	O
hooks	O
have	O
actually	O
been	O
inserted	O
into	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
.	O
</s>
<s>
At	O
the	O
2001	O
Linux	B-Operating_System
Kernel	I-Operating_System
Summit	O
,	O
the	O
NSA	O
proposed	O
that	O
SELinux	B-Application
be	O
included	O
in	O
Linux	B-Operating_System
2.5	O
.	O
</s>
<s>
Linus	O
Torvalds	O
rejected	O
SELinux	B-Application
at	O
that	O
time	O
,	O
because	O
he	O
observed	O
that	O
there	O
are	O
many	O
different	O
security	O
projects	O
in	O
development	O
,	O
and	O
since	O
they	O
all	O
differ	O
,	O
the	O
security	O
community	O
has	O
not	O
yet	O
formed	O
consensus	O
on	O
the	O
ultimate	O
security	O
model	O
.	O
</s>
<s>
Instead	O
,	O
Linus	O
charged	O
the	O
security	O
community	O
to	O
"	O
make	O
it	O
a	O
module	B-Application
"	O
.	O
</s>
<s>
In	O
response	O
,	O
Crispin	O
Cowan	O
proposed	O
LSM	O
:	O
an	O
interface	O
for	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
that	O
provides	O
sufficient	O
"	O
hooks	O
"	O
(	O
upcalls	O
)	O
from	O
within	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
to	O
a	O
loadable	B-Application
module	I-Application
so	O
as	O
to	O
allow	O
the	O
module	B-Application
to	O
enforce	O
mandatory	O
access	O
controls	O
.	O
</s>
<s>
LSM	O
was	O
ultimately	O
accepted	O
into	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
mainstream	O
and	O
was	O
included	O
as	O
a	O
standard	O
part	O
of	O
Linux	B-Operating_System
2.6	I-Operating_System
in	O
December	O
2003	O
.	O
</s>
<s>
In	O
2006	O
,	O
some	O
kernel	B-Operating_System
developers	O
observed	O
that	O
SELinux	B-Application
was	O
the	O
only	O
widely	O
used	O
LSM	O
module	B-Application
included	O
in	O
the	O
mainstream	O
Linux	B-Operating_System
kernel	I-Operating_System
source	O
tree	O
.	O
</s>
<s>
If	O
there	O
is	O
to	O
be	O
only	O
one	O
widely	O
used	O
LSM	O
module	B-Application
,	O
it	O
was	O
reasoned	O
,	O
then	O
the	O
indirection	O
of	O
LSM	O
is	O
unnecessary	O
,	O
and	O
LSM	O
should	O
be	O
removed	O
and	O
replaced	O
with	O
SELinux	B-Application
itself	O
.	O
</s>
<s>
However	O
,	O
there	O
are	O
other	O
LSM	O
modules	B-Application
maintained	O
outside	O
of	O
the	O
mainstream	O
kernel	B-Operating_System
tree	O
(	O
AppArmor	O
,	O
Linux	B-Operating_System
Intrusion	O
Detection	O
System	O
,	O
FireFlier	O
,	O
CIPSO	O
,	O
Multi	O
ADM	O
,	O
etc	O
.	O
</s>
<s>
)	O
,	O
so	O
this	O
argument	O
led	O
to	O
two	O
results	O
:	O
1	O
.	O
that	O
developers	O
of	O
these	O
modules	B-Application
started	O
putting	O
effort	O
into	O
upstreaming	O
their	O
respective	O
modules	B-Application
,	O
and	O
2	O
.	O
at	O
the	O
2006	O
Kernel	B-Operating_System
Summit	O
,	O
Linus	O
once	O
again	O
asserted	O
that	O
LSM	O
would	O
stay	O
because	O
he	O
does	O
not	O
want	O
to	O
arbitrate	O
which	O
is	O
the	O
best	O
security	O
model	O
.	O
</s>
<s>
LSM	O
is	O
likely	O
to	O
remain	O
since	O
additional	O
security	O
modules	B-Application
Smack	B-Application
(	O
version	O
2.6.25	O
)	O
,	O
TOMOYO	O
Linux	B-Operating_System
(	O
version	O
2.6.30	O
,	O
June	O
2009	O
)	O
and	O
AppArmor	O
(	O
version	O
2.6.36	O
)	O
were	O
accepted	O
in	O
the	O
mainline	O
kernel	B-Operating_System
.	O
</s>
