<s>
Proof-carrying	B-Application
code	I-Application
(	O
PCC	O
)	O
is	O
a	O
software	O
mechanism	O
that	O
allows	O
a	O
host	O
system	O
to	O
verify	O
properties	O
about	O
an	O
application	O
via	O
a	O
formal	O
proof	O
that	O
accompanies	O
the	O
application	O
's	O
executable	O
code	O
.	O
</s>
<s>
This	O
can	O
be	O
particularly	O
useful	O
in	O
ensuring	O
memory	B-Application
safety	I-Application
(	O
i.e.	O
</s>
<s>
preventing	O
issues	O
like	O
buffer	B-General_Concept
overflows	I-General_Concept
)	O
.	O
</s>
<s>
Proof-carrying	B-Application
code	I-Application
was	O
originally	O
described	O
in	O
1996	O
by	O
George	O
Necula	O
and	O
Peter	O
Lee	O
.	O
</s>
<s>
The	O
original	O
publication	O
on	O
proof-carrying	B-Application
code	I-Application
in	O
1996	O
used	O
packet	B-Protocol
filters	I-Protocol
as	O
an	O
example	O
:	O
a	O
user-mode	O
application	O
hands	O
a	O
function	O
written	O
in	O
machine	O
code	O
to	O
the	O
kernel	O
that	O
determines	O
whether	O
or	O
not	O
an	O
application	O
is	O
interested	O
in	O
processing	O
a	O
particular	O
network	O
packet	O
.	O
</s>
<s>
Because	O
the	O
packet	B-Protocol
filter	I-Protocol
runs	O
in	O
kernel	O
mode	O
,	O
it	O
could	O
compromise	O
the	O
integrity	O
of	O
the	O
system	O
if	O
it	O
contains	O
malicious	O
code	O
that	O
writes	O
to	O
kernel	O
data	O
structures	O
.	O
</s>
<s>
Traditional	O
approaches	O
to	O
this	O
problem	O
include	O
interpreting	O
a	O
domain-specific	B-Language
language	I-Language
for	O
packet	O
filtering	O
,	O
inserting	O
checks	O
on	O
each	O
memory	O
access	O
(	O
software	O
fault	O
isolation	O
)	O
,	O
and	O
writing	O
the	O
filter	O
in	O
a	O
high-level	O
language	O
which	O
is	O
compiled	O
by	O
the	O
kernel	O
before	O
it	O
is	O
run	O
.	O
</s>
<s>
These	O
approaches	O
have	O
performance	O
disadvantages	O
for	O
code	O
as	O
frequently	O
run	O
as	O
a	O
packet	B-Protocol
filter	I-Protocol
,	O
except	O
for	O
the	O
in-kernel	O
compilation	O
approach	O
,	O
which	O
only	O
compiles	O
the	O
code	O
when	O
it	O
is	O
loaded	O
,	O
not	O
every	O
time	O
it	O
is	O
executed	O
.	O
</s>
<s>
With	O
proof-carrying	B-Application
code	I-Application
,	O
the	O
kernel	O
publishes	O
a	O
security	O
policy	O
specifying	O
properties	O
that	O
any	O
packet	B-Protocol
filter	I-Protocol
must	O
obey	O
:	O
for	O
example	O
,	O
will	O
not	O
access	O
memory	O
outside	O
of	O
the	O
packet	O
and	O
its	O
scratch	O
memory	O
area	O
.	O
</s>
<s>
A	O
theorem	B-Application
prover	I-Application
is	O
used	O
to	O
show	O
that	O
the	O
machine	O
code	O
satisfies	O
this	O
policy	O
.	O
</s>
<s>
If	O
a	O
malicious	O
party	O
modifies	O
either	O
the	O
machine	O
code	O
or	O
the	O
proof	O
,	O
the	O
resulting	O
proof-carrying	B-Application
code	I-Application
is	O
either	O
invalid	O
or	O
harmless	O
(	O
still	O
satisfies	O
the	O
security	O
policy	O
)	O
.	O
</s>
