<s>
Spectre	B-Error_Name
refers	O
to	O
one	O
of	O
the	O
two	O
original	O
transient	O
execution	O
CPU	O
vulnerabilities	O
(	O
the	O
other	O
being	O
Meltdown	B-Architecture
)	O
,	O
which	O
involve	O
microarchitectural	B-General_Concept
timing	O
side-channel	O
attacks	O
.	O
</s>
<s>
These	O
affect	O
modern	O
microprocessors	B-Architecture
that	O
perform	O
branch	B-General_Concept
prediction	I-General_Concept
and	O
other	O
forms	O
of	O
speculation	O
.	O
</s>
<s>
On	O
most	O
processors	O
,	O
the	O
speculative	B-General_Concept
execution	I-General_Concept
resulting	O
from	O
a	O
branch	B-General_Concept
misprediction	I-General_Concept
may	O
leave	O
observable	O
side	O
effects	O
that	O
may	O
reveal	O
private	O
data	O
to	O
attackers	O
.	O
</s>
<s>
For	O
example	O
,	O
if	O
the	O
pattern	O
of	O
memory	B-General_Concept
accesses	O
performed	O
by	O
such	O
speculative	B-General_Concept
execution	I-General_Concept
depends	O
on	O
private	O
data	O
,	O
the	O
resulting	O
state	O
of	O
the	O
data	B-General_Concept
cache	I-General_Concept
constitutes	O
a	O
side	O
channel	O
through	O
which	O
an	O
attacker	O
may	O
be	O
able	O
to	O
extract	O
information	O
about	O
the	O
private	O
data	O
using	O
a	O
timing	O
attack	O
.	O
</s>
<s>
Two	O
Common	O
Vulnerabilities	O
and	O
Exposures	O
IDs	O
related	O
to	O
Spectre	B-Error_Name
,	O
(	O
bounds	O
check	O
bypass	O
,	O
Spectre-V1	O
,	O
Spectre1.0	O
)	O
and	O
(	O
branch	O
target	O
injection	O
,	O
Spectre-V2	O
)	O
,	O
have	O
been	O
issued	O
.	O
</s>
<s>
JIT	B-Language
engines	I-Language
used	O
for	O
JavaScript	B-Language
were	O
found	O
to	O
be	O
vulnerable	O
.	O
</s>
<s>
A	O
website	O
can	O
read	O
data	O
stored	O
in	O
the	O
browser	B-Application
for	O
another	O
website	O
,	O
or	O
the	O
browser	B-Application
's	O
memory	B-General_Concept
itself	O
.	O
</s>
<s>
In	O
early	O
2018	O
,	O
Intel	O
reported	O
that	O
it	O
would	O
redesign	O
its	O
CPUs	B-General_Concept
to	O
help	O
protect	O
against	O
the	O
Spectre	B-Error_Name
and	O
related	O
Meltdown	B-Architecture
vulnerabilities	I-Architecture
(	O
especially	O
,	O
Spectre	B-Error_Name
variant	O
2	O
and	O
Meltdown	B-Architecture
,	O
but	O
not	O
Spectre	B-Error_Name
variant	O
1	O
)	O
.	O
</s>
<s>
On	O
8	O
October	O
2018	O
,	O
Intel	O
was	O
reported	O
to	O
have	O
added	O
hardware	O
and	O
firmware	O
mitigations	O
regarding	O
Spectre	B-Error_Name
and	O
Meltdown	B-Architecture
vulnerabilities	I-Architecture
to	O
its	O
latest	O
processors	O
.	O
</s>
<s>
In	O
2002	O
and	O
2003	O
,	O
Yukiyasu	O
Tsunoo	O
and	O
colleagues	O
from	O
NEC	O
showed	O
how	O
to	O
attack	O
MISTY	B-Algorithm
and	O
DES	B-Algorithm
symmetric	O
key	O
ciphers	O
,	O
respectively	O
.	O
</s>
<s>
In	O
2005	O
,	O
Daniel	O
Bernstein	O
from	O
the	O
University	O
of	O
Illinois	O
,	O
Chicago	O
reported	O
an	O
extraction	O
of	O
an	O
OpenSSL	B-Language
AES	B-Algorithm
key	I-Algorithm
via	O
a	O
cache	B-General_Concept
timing	O
attack	O
,	O
and	O
Colin	O
Percival	O
had	O
a	O
working	O
attack	O
on	O
the	O
OpenSSL	B-Language
RSA	B-Architecture
key	O
using	O
the	O
Intel	O
processor	O
's	O
cache	B-General_Concept
.	O
</s>
<s>
In	O
2013	O
Yuval	O
Yarom	O
and	O
Katrina	O
Falkner	O
from	O
the	O
University	O
of	O
Adelaide	O
showed	O
how	O
measuring	O
the	O
access	O
time	O
to	O
data	O
lets	O
a	O
nefarious	O
application	O
determine	O
if	O
the	O
information	O
was	O
read	O
from	O
the	O
cache	B-General_Concept
or	O
not	O
.	O
</s>
<s>
If	O
it	O
was	O
read	O
from	O
the	O
cache	B-General_Concept
the	O
access	O
time	O
would	O
be	O
very	O
short	O
,	O
meaning	O
the	O
data	O
read	O
could	O
contain	O
the	O
private	O
key	O
of	O
encryption	O
algorithms	O
.	O
</s>
<s>
This	O
technique	O
was	O
used	O
to	O
successfully	O
attack	O
GnuPG	O
,	O
AES	B-Algorithm
and	O
other	O
cryptographic	O
implementations	O
.	O
</s>
<s>
Spectre	B-Error_Name
proper	O
was	O
discovered	O
independently	O
by	O
Jann	O
Horn	O
from	O
Google	B-Application
's	I-Application
Project	O
Zero	O
and	O
Paul	O
Kocher	O
in	O
collaboration	O
with	O
Daniel	O
Genkin	O
,	O
Mike	O
Hamburg	O
,	O
Moritz	O
Lipp	O
,	O
and	O
Yuval	O
Yarom	O
.	O
</s>
<s>
Microsoft	O
Vulnerability	O
Research	O
extended	O
it	O
to	O
browsers	B-Application
 '	O
JavaScript	B-Language
JIT	B-Language
engines	I-Language
.	O
</s>
<s>
It	O
was	O
made	O
public	O
in	O
conjunction	O
with	O
another	O
vulnerability	O
,	O
Meltdown	B-Architecture
,	O
on	O
3	O
January	O
2018	O
,	O
after	O
the	O
affected	O
hardware	O
vendors	O
had	O
already	O
been	O
made	O
aware	O
of	O
the	O
issue	O
on	O
1	O
June	O
2017	O
.	O
</s>
<s>
The	O
vulnerability	O
was	O
called	O
Spectre	B-Error_Name
because	O
it	O
was	O
"	O
based	O
on	O
the	O
root	O
cause	O
,	O
speculative	B-General_Concept
execution	I-General_Concept
.	O
</s>
<s>
On	O
28	O
January	O
2018	O
,	O
it	O
was	O
reported	O
that	O
Intel	O
shared	O
news	O
of	O
the	O
Meltdown	B-Architecture
and	O
Spectre	B-Error_Name
security	O
vulnerabilities	O
with	O
Chinese	O
technology	O
companies	O
,	O
before	O
notifying	O
the	O
U.S.	O
government	O
of	O
the	O
flaws	O
.	O
</s>
<s>
On	O
29	O
January	O
2018	O
,	O
Microsoft	O
was	O
reported	O
to	O
have	O
released	O
a	O
Windows	O
update	O
that	O
disabled	O
the	O
problematic	O
Intel	B-Device
Microcode	I-Device
fix	O
—	O
which	O
had	O
,	O
in	O
some	O
cases	O
,	O
caused	O
reboots	O
,	O
system	O
instability	O
,	O
and	O
data	O
loss	O
or	O
corruption	O
—	O
issued	O
earlier	O
by	O
Intel	O
for	O
the	O
Spectre	B-Error_Name
Variant	O
2	O
attack	O
.	O
</s>
<s>
Since	O
the	O
disclosure	O
of	O
Spectre	B-Error_Name
and	O
Meltdown	B-Architecture
in	O
January	O
2018	O
,	O
much	O
research	O
had	O
been	O
done	O
on	O
vulnerabilities	O
related	O
to	O
speculative	B-General_Concept
execution	I-General_Concept
.	O
</s>
<s>
On	O
3	O
May	O
2018	O
,	O
eight	O
additional	O
Spectre-class	B-Error_Name
flaws	I-Error_Name
provisionally	O
named	O
Spectre-NG	O
by	O
c't	O
(	O
a	O
German	O
computer	O
magazine	O
)	O
were	O
reported	O
affecting	O
Intel	O
and	O
possibly	O
AMD	O
and	O
ARM	B-Architecture
processors	I-Architecture
.	O
</s>
<s>
Affected	O
are	O
all	O
Core	B-General_Concept
i	I-General_Concept
Series	I-General_Concept
processors	O
and	O
Xeon	B-Device
derivates	O
since	O
Nehalem	B-Device
(	O
2010	O
)	O
and	O
Atom-based	O
processors	O
since	O
2013	O
.	O
</s>
<s>
Intel	O
postponed	O
their	O
release	O
of	O
microcode	B-Device
updates	O
to	O
10	O
July	O
2018	O
.	O
</s>
<s>
On	O
21	O
May	O
2018	O
,	O
Intel	O
published	O
information	O
on	O
the	O
first	O
two	O
Spectre-NG	O
class	O
side-channel	O
vulnerabilities	O
(	O
Rogue	O
System	O
Register	O
Read	O
,	O
Variant	O
3a	O
)	O
and	O
(	O
Speculative	B-Error_Name
Store	I-Error_Name
Bypass	I-Error_Name
,	O
Variant	B-Error_Name
4	I-Error_Name
)	O
,	O
also	O
referred	O
to	O
as	O
Intel	B-Error_Name
SA-00115	I-Error_Name
and	O
HP	B-Error_Name
PSR-2018-0074	I-Error_Name
,	O
respectively	O
.	O
</s>
<s>
According	O
to	O
Amazon	B-Application
Germany	I-Application
,	O
Cyberus	O
Technology	O
,	O
SYSGO	O
,	O
and	O
Colin	O
Percival	O
(	O
FreeBSD	B-Operating_System
)	O
,	O
Intel	O
revealed	O
details	O
on	O
the	O
third	O
Spectre-NG	O
variant	O
(	O
Lazy	B-Error_Name
FP	I-Error_Name
State	I-Error_Name
Restore	I-Error_Name
,	O
Intel	B-Error_Name
SA-00145	I-Error_Name
)	O
on	O
13	O
June	O
2018	O
.	O
</s>
<s>
It	O
is	O
also	O
known	O
as	O
Lazy	B-Error_Name
FPU	I-Error_Name
state	I-Error_Name
leak	I-Error_Name
(	O
abbreviated	O
"	O
LazyFP	B-Error_Name
"	O
)	O
and	O
"	O
Spectre-NG	B-Error_Name
3	I-Error_Name
"	O
.	O
</s>
<s>
On	O
10	O
July	O
2018	O
,	O
Intel	O
revealed	O
details	O
on	O
another	O
Spectre-NG	O
class	O
vulnerability	O
called	O
"	O
Bounds	O
Check	O
Bypass	O
Store	O
"	O
(	O
BCBS	O
)	O
,	O
or	O
"	O
Spectre1.1	O
"	O
(	O
)	O
,	O
which	O
was	O
able	O
to	O
write	O
as	O
well	O
as	O
read	O
out	O
of	O
bounds	O
.	O
</s>
<s>
Another	O
variant	O
named	O
"	O
Spectre1.2	B-Error_Name
"	O
was	O
mentioned	O
as	O
well	O
.	O
</s>
<s>
In	O
late	O
July	O
2018	O
,	O
researchers	O
at	O
the	O
universities	O
of	O
Saarland	O
and	O
California	O
revealed	O
ret2spec	O
(	O
aka	O
"	O
Spectre	B-Error_Name
v5	O
"	O
)	O
and	O
SpectreRSB	O
,	O
new	O
types	O
of	O
code	O
execution	O
vulnerabilities	O
using	O
the	O
return	B-Language
stack	O
buffer	O
(	O
RSB	O
)	O
.	O
</s>
<s>
At	O
the	O
end	O
of	O
July	O
2018	O
,	O
researchers	O
at	O
the	O
Graz	O
University	O
of	O
Technology	O
revealed	O
"	O
NetSpectre	O
"	O
,	O
a	O
new	O
type	O
of	O
remote	O
attack	O
similar	O
to	O
Spectre	B-Error_Name
V1	O
,	O
but	O
which	O
does	O
not	O
need	O
attacker-controlled	O
code	O
to	O
be	O
run	O
on	O
the	O
target	O
device	O
at	O
all	O
.	O
</s>
<s>
On	O
8	O
October	O
2018	O
,	O
Intel	O
was	O
reported	O
to	O
have	O
added	O
hardware	O
and	O
firmware	O
mitigations	O
regarding	O
Spectre	B-Error_Name
and	O
Meltdown	B-Architecture
vulnerabilities	I-Architecture
to	O
its	O
latest	O
processors	O
.	O
</s>
<s>
Researchers	O
attempted	O
to	O
compromise	O
CPU	O
protection	O
mechanisms	O
using	O
code	O
to	O
exploit	O
the	O
CPU	O
pattern	O
history	O
table	O
,	O
branch	O
target	O
buffer	O
,	O
return	B-Language
stack	O
buffer	O
,	O
and	O
branch	O
history	O
table	O
.	O
</s>
<s>
In	O
August	O
2019	O
,	O
a	O
related	O
transient	O
execution	O
CPU	O
vulnerability	O
,	O
Spectre	B-Device
SWAPGS	I-Device
(	O
)	O
,	O
was	O
reported	O
.	O
</s>
<s>
In	O
late	O
April	O
2021	O
,	O
a	O
related	O
vulnerability	O
was	O
discovered	O
that	O
breaks	O
through	O
the	O
security	O
systems	O
designed	O
to	O
mitigate	O
Spectre	B-Error_Name
through	O
use	O
of	O
the	O
micro-op	O
cache	B-General_Concept
.	O
</s>
<s>
The	O
vulnerability	O
is	O
known	O
to	O
affect	O
Skylake	B-Architecture
and	O
later	O
processors	O
from	O
Intel	O
and	O
Zen-based	O
processors	O
from	O
AMD	O
.	O
</s>
<s>
In	O
February	O
2023	O
,	O
a	O
team	O
of	O
researchers	O
at	O
North	O
Carolina	O
State	O
University	O
uncovered	O
a	O
new	O
code	O
execution	O
vulnerability	O
called	O
Spectre-HD	O
,	O
also	O
known	O
as	O
"	O
Spectre	B-Error_Name
SRV	O
"	O
or	O
"	O
Spectre	B-Error_Name
v6	O
"	O
.	O
</s>
<s>
Spectre	B-Error_Name
is	O
a	O
vulnerability	O
that	O
tricks	O
a	O
program	O
into	O
accessing	O
arbitrary	O
locations	O
in	O
the	O
program	O
's	O
memory	B-General_Concept
space	O
.	O
</s>
<s>
An	O
attacker	O
may	O
read	O
the	O
content	O
of	O
accessed	O
memory	B-General_Concept
,	O
and	O
thus	O
potentially	O
obtain	O
sensitive	O
data	O
.	O
</s>
<s>
Instead	O
of	O
a	O
single	O
easy-to-fix	O
vulnerability	O
,	O
the	O
Spectre	B-Error_Name
white	O
paper	O
describes	O
a	O
whole	O
class	O
of	O
potential	O
vulnerabilities	O
.	O
</s>
<s>
They	O
are	O
all	O
based	O
on	O
exploiting	O
side	O
effects	O
of	O
speculative	B-General_Concept
execution	I-General_Concept
,	O
a	O
common	O
means	O
of	O
hiding	O
memory	B-General_Concept
latency	I-General_Concept
and	O
so	O
speeding	O
up	O
execution	O
in	O
modern	O
microprocessors	B-Architecture
.	O
</s>
<s>
In	O
particular	O
,	O
Spectre	B-Error_Name
centers	O
on	O
branch	B-General_Concept
prediction	I-General_Concept
,	O
which	O
is	O
a	O
special	O
case	O
of	O
speculative	B-General_Concept
execution	I-General_Concept
.	O
</s>
<s>
Unlike	O
the	O
related	O
Meltdown	B-Architecture
vulnerability	I-Architecture
disclosed	O
at	O
the	O
same	O
time	O
,	O
Spectre	B-Error_Name
does	O
not	O
rely	O
on	O
a	O
specific	O
feature	O
of	O
a	O
single	O
processor	O
's	O
memory	B-General_Concept
management	I-General_Concept
and	O
protection	O
system	O
,	O
but	O
is	O
instead	O
a	O
more	O
generalized	O
idea	O
.	O
</s>
<s>
The	O
starting	O
point	O
of	O
the	O
white	O
paper	O
is	O
that	O
of	O
a	O
side-channel	O
timing	O
attack	O
applied	O
to	O
the	O
branch	B-General_Concept
prediction	I-General_Concept
machinery	O
of	O
modern	O
out-of-order	B-General_Concept
executing	I-General_Concept
microprocessors	B-Architecture
.	O
</s>
<s>
While	O
at	O
the	O
architectural	B-General_Concept
level	O
documented	O
in	O
processor	O
data	O
books	O
,	O
any	O
results	O
of	O
misprediction	B-General_Concept
are	O
specified	O
to	O
be	O
discarded	O
after	O
the	O
fact	O
,	O
the	O
resulting	O
speculative	B-General_Concept
execution	I-General_Concept
may	O
still	O
leave	O
side	O
effects	O
,	O
like	O
loaded	O
cache	B-General_Concept
lines	O
.	O
</s>
<s>
If	O
such	O
side	O
effects	O
including	O
but	O
not	O
limited	O
to	O
memory	B-General_Concept
access	O
timing	O
are	O
visible	O
to	O
a	O
malicious	O
program	O
,	O
and	O
can	O
be	O
engineered	O
to	O
depend	O
on	O
sensitive	O
data	O
held	O
by	O
the	O
victim	O
process	B-Operating_System
,	O
then	O
these	O
side	O
effects	O
can	O
result	O
in	O
such	O
data	O
becoming	O
discernible	O
.	O
</s>
<s>
This	O
can	O
happen	O
despite	O
the	O
formal	O
architecture-level	O
security	O
arrangements	O
working	O
as	O
designed	O
;	O
in	O
this	O
case	O
,	O
lower	B-Architecture
,	O
microarchitecture-level	O
optimizations	O
to	O
code	O
execution	O
can	O
leak	O
information	O
not	O
essential	O
to	O
the	O
correctness	O
of	O
normal	O
program	O
execution	O
.	O
</s>
<s>
The	O
Spectre	B-Error_Name
paper	O
displays	O
the	O
attack	O
in	O
four	O
essential	O
steps	O
:	O
</s>
<s>
First	O
,	O
it	O
shows	O
that	O
branch	B-General_Concept
prediction	I-General_Concept
logic	O
in	O
modern	O
processors	O
can	O
be	O
trained	O
to	O
reliably	O
hit	O
or	O
miss	O
based	O
on	O
the	O
internal	O
workings	O
of	O
a	O
malicious	O
program	O
.	O
</s>
<s>
It	O
then	O
goes	O
on	O
to	O
show	O
that	O
the	O
subsequent	O
difference	O
between	O
cache	B-General_Concept
hits	O
and	O
misses	O
can	O
be	O
reliably	O
timed	O
,	O
so	O
that	O
what	O
should	O
have	O
been	O
a	O
simple	O
non-functional	O
difference	O
can	O
in	O
fact	O
be	O
subverted	O
into	O
a	O
covert	O
channel	O
which	O
extracts	O
information	O
from	O
an	O
unrelated	O
process	B-Operating_System
's	O
inner	O
workings	O
.	O
</s>
<s>
Thirdly	O
,	O
the	O
paper	O
synthesizes	O
the	O
results	O
with	O
return-oriented	O
programming	O
exploits	O
and	O
other	O
principles	O
with	O
a	O
simple	O
example	O
program	O
and	O
a	O
JavaScript	B-Language
snippet	O
run	O
under	O
a	O
sandboxing	O
browser	B-Application
;	O
in	O
both	O
cases	O
,	O
the	O
entire	O
address	O
space	O
of	O
the	O
victim	O
process	B-Operating_System
(	O
i.e.	O
</s>
<s>
the	O
contents	O
of	O
a	O
running	O
program	O
)	O
is	O
shown	O
to	O
be	O
readable	O
by	O
simply	O
exploiting	O
speculative	B-General_Concept
execution	I-General_Concept
of	O
conditional	O
branches	O
in	O
code	O
generated	O
by	O
a	O
stock	O
compiler	B-Language
or	O
the	O
JavaScript	B-Language
machinery	I-Language
present	O
in	O
an	O
existing	O
browser	B-Application
.	O
</s>
<s>
The	O
basic	O
idea	O
is	O
to	O
search	O
existing	O
code	O
for	O
places	O
where	O
speculation	O
touches	O
upon	O
otherwise	O
inaccessible	O
data	O
,	O
manipulate	O
the	O
processor	O
into	O
a	O
state	O
where	O
speculative	B-General_Concept
execution	I-General_Concept
has	O
to	O
contact	O
that	O
data	O
,	O
and	O
then	O
time	O
the	O
side	O
effect	O
of	O
the	O
processor	O
being	O
faster	O
,	O
if	O
its	O
by-now-prepared	O
prefetch	B-General_Concept
machinery	I-General_Concept
indeed	O
did	O
load	O
a	O
cache	B-General_Concept
line	O
.	O
</s>
<s>
Finally	O
,	O
the	O
paper	O
concludes	O
by	O
generalizing	O
the	O
attack	O
to	O
any	O
non-functional	O
state	O
of	O
the	O
victim	O
process	B-Operating_System
.	O
</s>
<s>
Meltdown	B-Architecture
can	O
be	O
used	O
to	O
read	O
privileged	B-Operating_System
memory	I-Operating_System
in	O
a	O
process	B-Operating_System
's	O
address	O
space	O
which	O
even	O
the	O
process	B-Operating_System
itself	O
would	O
normally	O
be	O
unable	O
to	O
access	O
(	O
on	O
some	O
unprotected	O
OSes	O
this	O
includes	O
data	O
belonging	O
to	O
the	O
kernel	O
or	O
other	O
processes	O
)	O
.	O
</s>
<s>
It	O
was	O
shown	O
that	O
under	O
certain	O
circumstances	O
,	O
the	O
Spectre	B-Error_Name
vulnerability	I-Error_Name
is	O
also	O
capable	O
of	O
reading	O
memory	B-General_Concept
outside	O
of	O
the	O
current	O
processes	O
memory	B-General_Concept
space	O
.	O
</s>
<s>
The	O
Meltdown	B-Architecture
paper	O
distinguishes	O
the	O
two	O
vulnerabilities	O
thus	O
:	O
"	O
Meltdown	B-Architecture
is	O
distinct	O
from	O
the	O
Spectre	B-Error_Name
Attacks	I-Error_Name
in	O
several	O
ways	O
,	O
notably	O
that	O
Spectre	B-Error_Name
requires	O
tailoring	O
to	O
the	O
victim	O
process	B-Operating_System
's	O
software	O
environment	O
,	O
but	O
applies	O
more	O
broadly	O
to	O
CPUs	B-General_Concept
and	O
is	O
not	O
mitigated	O
by	O
KAISER.	O
"	O
</s>
<s>
While	O
Spectre	B-Error_Name
is	O
simpler	O
to	O
exploit	O
with	O
a	O
compiled	B-Language
language	I-Language
such	O
as	O
C	B-Language
or	O
C++	B-Language
by	O
locally	O
executing	O
machine	B-Language
code	I-Language
,	O
it	O
can	O
also	O
be	O
remotely	O
exploited	O
by	O
code	O
hosted	O
on	O
remote	O
malicious	O
web	O
pages	O
,	O
for	O
example	O
interpreted	B-Application
languages	I-Application
like	O
JavaScript	B-Language
,	O
which	O
run	O
locally	O
using	O
a	O
web	B-Application
browser	I-Application
.	O
</s>
<s>
The	O
scripted	O
malware	O
would	O
then	O
have	O
access	O
to	O
all	O
the	O
memory	B-General_Concept
mapped	O
to	O
the	O
address	O
space	O
of	O
the	O
running	O
browser	B-Application
.	O
</s>
<s>
The	O
exploit	O
using	O
remote	O
JavaScript	B-Language
follows	O
a	O
similar	O
flow	O
to	O
that	O
of	O
a	O
local	O
machine	B-Language
code	I-Language
exploit	O
:	O
flush	O
cache	B-General_Concept
→	O
mistrain	O
branch	B-General_Concept
predictor	I-General_Concept
→	O
timed	O
reads	O
(	O
tracking	O
hit/	O
miss	O
)	O
.	O
</s>
<s>
The	O
clflush	O
instruction	O
(	O
cache-line	O
flush	O
)	O
cannot	O
be	O
used	O
directly	O
from	O
JavaScript	B-Language
,	O
so	O
ensuring	O
it	O
is	O
used	O
requires	O
another	O
approach	O
.	O
</s>
<s>
There	O
are	O
several	O
automatic	O
cache	B-General_Concept
eviction	O
policies	O
which	O
the	O
CPU	O
may	O
choose	O
,	O
and	O
the	O
attack	O
relies	O
on	O
being	O
able	O
to	O
force	O
that	O
eviction	O
for	O
the	O
exploit	O
to	O
work	O
.	O
</s>
<s>
It	O
was	O
found	O
that	O
using	O
a	O
second	O
index	O
on	O
the	O
large	O
array	O
,	O
which	O
was	O
kept	O
several	O
iterations	O
behind	O
the	O
first	O
index	O
,	O
would	O
cause	O
the	O
least	B-General_Concept
recently	I-General_Concept
used	I-General_Concept
(	O
LRU	O
)	O
policy	O
to	O
be	O
used	O
.	O
</s>
<s>
This	O
allows	O
the	O
exploit	O
to	O
effectively	O
clear	O
the	O
cache	B-General_Concept
just	O
by	O
doing	O
incremental	O
reads	O
on	O
a	O
large	O
dataset	O
.	O
</s>
<s>
The	O
branch	B-General_Concept
predictor	I-General_Concept
would	O
then	O
be	O
mistrained	O
by	O
iterating	O
over	O
a	O
very	O
large	O
dataset	O
using	O
bitwise	O
operations	O
for	O
setting	O
the	O
index	O
to	O
in-range	O
values	O
,	O
and	O
then	O
using	O
an	O
out-of-bounds	O
address	O
for	O
the	O
final	O
iteration	O
.	O
</s>
<s>
A	O
high-precision	O
timer	O
would	O
then	O
be	O
required	O
in	O
order	O
to	O
determine	O
if	O
a	O
set	O
of	O
reads	O
led	O
to	O
a	O
cache-hit	O
or	O
a	O
cache-miss	O
.	O
</s>
<s>
While	O
browsers	B-Application
like	O
Chrome	B-Application
,	O
Firefox	B-Application
,	O
and	O
Tor	B-Operating_System
Browser	I-Operating_System
(	O
based	O
on	O
Firefox	B-Application
)	O
have	O
placed	O
restrictions	O
on	O
the	O
resolution	O
of	O
timers	O
(	O
required	O
in	O
Spectre	B-Error_Name
exploit	I-Error_Name
to	O
determine	O
if	O
cache	B-General_Concept
hit/miss	O
)	O
,	O
at	O
the	O
time	O
of	O
authoring	O
the	O
white	O
paper	O
,	O
the	O
Spectre	B-Error_Name
author	O
was	O
able	O
to	O
create	O
a	O
high-precision	O
timer	O
using	O
the	O
web	O
worker	O
feature	O
of	O
HTML5	B-Application
.	O
</s>
<s>
Careful	O
coding	O
and	O
analysis	O
of	O
the	O
machine	B-Language
code	I-Language
executed	O
by	O
the	O
just-in-time	O
compilation	B-Language
(	O
JIT	O
)	O
compiler	B-Language
was	O
required	O
to	O
ensure	O
the	O
cache-clearing	O
and	O
exploitive	O
reads	O
were	O
not	O
optimized	O
out	O
.	O
</s>
<s>
As	O
of	O
2018	O
,	O
almost	O
every	O
computer	O
system	O
is	O
affected	O
by	O
Spectre	B-Error_Name
,	O
including	O
desktops	O
,	O
laptops	O
,	O
and	O
mobile	O
devices	O
.	O
</s>
<s>
Specifically	O
,	O
Spectre	B-Error_Name
has	O
been	O
shown	O
to	O
work	O
on	O
Intel	O
,	O
AMD	O
,	O
ARM-based	O
,	O
and	O
IBM	O
processors	O
.	O
</s>
<s>
AMD	O
originally	O
acknowledged	O
vulnerability	O
to	O
one	O
of	O
the	O
Spectre	B-Error_Name
variants	O
(	O
GPZ	O
variant	O
1	O
)	O
,	O
but	O
stated	O
that	O
vulnerability	O
to	O
another	O
(	O
GPZ	O
variant	O
2	O
)	O
had	O
not	O
been	O
demonstrated	O
on	O
AMD	O
processors	O
,	O
claiming	O
it	O
posed	O
a	O
"	O
near	O
zero	O
risk	O
of	O
exploitation	O
"	O
due	O
to	O
differences	O
in	O
AMD	O
architecture	O
.	O
</s>
<s>
Researchers	O
have	O
indicated	O
that	O
the	O
Spectre	B-Error_Name
vulnerability	I-Error_Name
can	O
possibly	O
affect	O
some	O
Intel	O
,	O
AMD	O
,	O
and	O
ARM	B-Architecture
processors	I-Architecture
.	O
</s>
<s>
Specifically	O
,	O
processors	O
with	O
speculative	B-General_Concept
execution	I-General_Concept
are	O
affected	O
with	O
these	O
vulnerabilities	O
.	O
</s>
<s>
ARM	B-Architecture
has	O
reported	O
that	O
the	O
majority	O
of	O
their	O
processors	O
are	O
not	O
vulnerable	O
,	O
and	O
published	O
a	O
list	O
of	O
the	O
specific	O
processors	O
that	O
are	O
affected	O
by	O
the	O
Spectre	B-Error_Name
vulnerability	I-Error_Name
:	O
Cortex-R7	O
,	O
Cortex-R8	O
,	O
Cortex-A8	B-Application
,	O
Cortex-A9	B-Application
,	O
Cortex-A15	O
,	O
Cortex-A17	B-Application
,	O
Cortex-A57	O
,	O
Cortex-A72	O
,	O
Cortex-A73	O
and	O
ARM	B-Architecture
Cortex-A75	O
cores	O
.	O
</s>
<s>
Other	O
manufacturers	O
 '	O
custom	O
CPU	O
cores	O
implementing	O
the	O
ARM	B-Architecture
instruction	I-Architecture
set	I-Architecture
,	O
such	O
as	O
those	O
found	O
in	O
newer	O
members	O
of	O
the	O
Apple	O
A	O
series	O
processors	O
,	O
have	O
also	O
been	O
reported	O
to	O
be	O
vulnerable	O
.	O
</s>
<s>
In	O
general	O
,	O
higher-performance	O
CPUs	B-General_Concept
tend	O
to	O
have	O
intensive	O
speculative	B-General_Concept
execution	I-General_Concept
,	O
making	O
them	O
vulnerable	O
to	O
Spectre	B-Error_Name
.	O
</s>
<s>
Spectre	B-Error_Name
has	O
the	O
potential	O
of	O
having	O
a	O
greater	O
impact	O
on	O
cloud	O
providers	O
than	O
Meltdown	B-Architecture
.	O
</s>
<s>
Whereas	O
Meltdown	B-Architecture
allows	O
unauthorized	O
applications	O
to	O
read	O
from	O
privileged	B-Operating_System
memory	I-Operating_System
to	O
obtain	O
sensitive	O
data	O
from	O
processes	O
running	O
on	O
the	O
same	O
cloud	O
server	O
,	O
Spectre	B-Error_Name
can	O
allow	O
malicious	O
programs	O
to	O
induce	O
a	O
hypervisor	B-Operating_System
to	O
transmit	O
the	O
data	O
to	O
a	O
guest	O
system	O
running	O
on	O
top	O
of	O
it	O
.	O
</s>
<s>
Since	O
Spectre	B-Error_Name
represents	O
a	O
whole	O
class	O
of	O
attacks	O
,	O
most	O
likely	O
,	O
there	O
cannot	O
be	O
a	O
single	O
patch	O
for	O
it	O
.	O
</s>
<s>
While	O
work	O
is	O
already	O
being	O
done	O
to	O
address	O
special	O
cases	O
of	O
the	O
vulnerability	O
,	O
the	O
original	O
website	O
devoted	O
to	O
Spectre	B-Error_Name
and	O
Meltdown	B-Architecture
states	O
:	O
"	O
As	O
 [ Spectre ] 	O
is	O
not	O
easy	O
to	O
fix	O
,	O
it	O
will	O
haunt	O
us	O
for	O
a	O
long	O
time.	O
"	O
</s>
<s>
At	O
the	O
same	O
time	O
,	O
according	O
to	O
Dell	O
:	O
"	O
No	O
'	O
real-world	O
'	O
exploits	O
of	O
these	O
vulnerabilities	O
[	O
i.e.	O
,	O
Meltdown	B-Architecture
and	O
Spectre ]	O
have	O
been	O
reported	O
to	O
date	O
[	O
7	O
February	O
2018 ]	O
,	O
though	O
researchers	O
have	O
produced	O
proof-of-concepts.	O
"	O
</s>
<s>
Spectre	B-Error_Name
patches	O
have	O
been	O
reported	O
to	O
significantly	O
slow	O
down	O
performance	O
,	O
especially	O
on	O
older	O
computers	O
;	O
on	O
the	O
newer	O
eighth-generation	O
Core	O
platforms	O
,	O
benchmark	O
performance	O
drops	O
of	O
2	O
–	O
14	O
percent	O
have	O
been	O
measured	O
.	O
</s>
<s>
On	O
18	O
January	O
2018	O
,	O
unwanted	O
reboots	O
,	O
even	O
for	O
newer	O
Intel	O
chips	O
,	O
due	O
to	O
Meltdown	B-Architecture
and	O
Spectre	B-Error_Name
patches	O
,	O
were	O
reported	O
.	O
</s>
<s>
It	O
has	O
been	O
suggested	O
that	O
the	O
cost	O
of	O
mitigation	O
can	O
be	O
alleviated	O
by	O
processors	O
which	O
feature	O
selective	O
translation	B-Architecture
lookaside	I-Architecture
buffer	I-Architecture
(	O
TLB	O
)	O
flushing	O
,	O
a	O
feature	O
which	O
is	O
called	O
process-context	O
identifier	O
(	O
PCID	O
)	O
under	O
Intel	O
64	O
architecture	O
,	O
and	O
under	O
Alpha	B-Device
,	O
an	O
address	O
space	O
number	O
(	O
ASN	O
)	O
.	O
</s>
<s>
This	O
has	O
led	O
to	O
an	O
arms	O
race	O
where	O
attackers	O
also	O
employ	O
machine	O
learning	O
to	O
thwart	O
machine	O
learning	O
based	O
detectors	O
,	O
and	O
detectors	O
in	O
turn	O
employ	O
Generative	B-Algorithm
Adversarial	I-Algorithm
Networks	I-Algorithm
to	O
adapt	O
detection	O
techniques	O
.	O
</s>
<s>
On	O
4	O
January	O
2018	O
,	O
Google	B-Application
detailed	O
a	O
new	O
technique	O
on	O
their	O
security	O
blog	O
called	O
"	O
Retpoline	O
"	O
(	O
a	O
portmanteau	O
of	O
return	B-Language
and	O
trampoline	B-General_Concept
)	O
which	O
can	O
overcome	O
the	O
Spectre	B-Error_Name
vulnerability	I-Error_Name
with	O
a	O
negligible	O
amount	O
of	O
processor	O
overhead	O
.	O
</s>
<s>
It	O
involves	O
compiler-level	O
steering	O
of	O
indirect	O
branches	O
towards	O
a	O
different	O
target	O
that	O
does	O
not	O
result	O
in	O
a	O
vulnerable	O
speculative	O
out-of-order	B-General_Concept
execution	I-General_Concept
taking	O
place	O
.	O
</s>
<s>
While	O
it	O
was	O
developed	O
for	O
the	O
x86	B-Operating_System
instruction	O
set	O
,	O
Google	B-Application
engineers	O
believe	O
the	O
technique	O
is	O
transferable	O
to	O
other	O
processors	O
as	O
well	O
.	O
</s>
<s>
On	O
25	O
January	O
2018	O
,	O
the	O
current	O
status	O
and	O
possible	O
future	O
considerations	O
in	O
solving	O
the	O
Meltdown	B-Architecture
and	O
Spectre	B-Error_Name
vulnerabilities	I-Error_Name
were	O
presented	O
.	O
</s>
<s>
In	O
March	O
2018	O
,	O
Intel	O
announced	O
that	O
they	O
had	O
developed	O
hardware	O
fixes	O
for	O
Meltdown	B-Architecture
and	O
Spectre-V2	O
only	O
,	O
but	O
not	O
Spectre-V1	O
.	O
</s>
<s>
The	O
vulnerabilities	O
were	O
mitigated	O
by	O
a	O
new	O
partitioning	O
system	O
that	O
improves	O
process	B-Operating_System
and	O
privilege-level	O
separation	O
.	O
</s>
<s>
On	O
8	O
October	O
2018	O
,	O
Intel	O
is	O
reported	O
to	O
have	O
added	O
hardware	O
and	O
firmware	O
mitigations	O
regarding	O
Spectre	B-Error_Name
and	O
Meltdown	B-Architecture
vulnerabilities	I-Architecture
to	O
its	O
Coffee	O
Lake-R	O
processors	O
and	O
onwards	O
.	O
</s>
<s>
On	O
16	O
April	O
2019	O
,	O
researchers	O
from	O
UC	O
San	O
Diego	O
and	O
University	O
of	O
Virginia	O
proposed	O
Context-Sensitive	O
Fencing	O
,	O
a	O
microcode-based	O
defense	O
mechanism	O
that	O
surgically	O
injects	O
fences	O
into	O
the	O
dynamic	B-General_Concept
execution	I-General_Concept
stream	O
,	O
protecting	O
against	O
a	O
number	O
of	O
Spectre	B-Error_Name
variants	O
at	O
just	O
8%	O
degradation	O
in	O
performance	O
.	O
</s>
<s>
On	O
26	O
November	O
2021	O
,	O
researchers	O
from	O
Texas	O
A&M	O
University	O
and	O
Intel	O
showed	O
that	O
Spectre	B-Error_Name
attack	I-Error_Name
(	O
and	O
other	O
family	O
of	O
transient	O
attacks	O
)	O
cannot	O
be	O
detected	O
by	O
typical	O
antivirus	O
or	O
anti-malware	O
software	O
currently	O
available	O
,	O
before	O
they	O
leak	O
data	O
.	O
</s>
<s>
It	O
was	O
shown	O
that	O
this	O
is	O
due	O
to	O
the	O
fact	O
that	O
these	O
attacks	O
can	O
leak	O
data	O
using	O
transient	O
instructions	O
that	O
never	O
get	O
committed	O
during	O
a	O
very	O
short	O
transient	O
window	O
and	O
so	O
are	O
not	O
visible	O
from	O
architecture	O
layer	O
(	O
software	O
)	O
before	O
leakage	O
,	O
but	O
they	O
are	O
visible	O
in	O
microarchitecture	B-General_Concept
layer	O
(	O
hardware	O
)	O
.	O
</s>
<s>
On	O
20	O
October	O
2022	O
,	O
researchers	O
from	O
the	O
North	O
Carolina	O
State	O
University	O
,	O
the	O
University	O
of	O
San	O
Diego	O
,	O
California	O
,	O
and	O
Intel	O
announced	O
that	O
they	O
were	O
able	O
to	O
design	O
the	O
first	O
detection	O
technology	O
that	O
can	O
detect	O
transient	O
attacks	O
before	O
leakage	O
in	O
the	O
microarchitecture	B-General_Concept
layer	O
(	O
hardware	O
)	O
.	O
</s>
<s>
This	O
technology	O
has	O
a	O
lightning-fast	O
speed	O
of	O
sampling	O
activity	O
of	O
transient	O
instructions	O
every	O
1ns	O
and	O
making	O
predictions	O
every	O
10	O
nanoseconds	O
,	O
allowing	O
detection	O
of	O
transient	O
attacks	O
such	O
as	O
Spectre	B-Error_Name
and	O
Meltdown	B-Architecture
before	O
data	O
leakage	O
occurs	O
,	O
and	O
it	O
automatically	O
enables	O
counter	O
measurements	O
in	O
the	O
chip	O
.	O
</s>
<s>
This	O
technology	O
is	O
also	O
equipped	O
with	O
adversarial	O
training	O
,	O
making	O
it	O
immune	O
to	O
large	O
category	O
of	O
adversarial	O
and	O
evasive	O
versions	O
of	O
Spectre	B-Error_Name
attack	I-Error_Name
.	O
</s>
<s>
When	O
Intel	O
announced	O
that	O
Spectre	B-Error_Name
mitigation	O
can	O
be	O
switched	O
on	O
as	O
a	O
"	O
security	O
feature	O
"	O
instead	O
of	O
being	O
an	O
always-on	O
bugfix	O
,	O
Linux	O
creator	O
Linus	O
Torvalds	O
called	O
the	O
patches	O
"	O
complete	O
and	O
utter	O
garbage	O
"	O
.	O
</s>
<s>
Ingo	O
Molnár	O
then	O
suggested	O
the	O
use	O
of	O
function	B-Application
tracing	I-Application
machinery	O
in	O
the	O
Linux	O
kernel	O
to	O
fix	O
Spectre	B-Error_Name
without	O
Indirect	O
Branch	O
Restricted	O
Speculation	O
(	O
IBRS	O
)	O
microcode	B-Device
support	O
.	O
</s>
<s>
This	O
would	O
,	O
as	O
a	O
result	O
,	O
only	O
have	O
a	O
performance	O
impact	O
on	O
processors	O
based	O
on	O
Intel	B-Architecture
Skylake	I-Architecture
and	O
newer	O
architecture	O
.	O
</s>
<s>
This	O
ftrace	B-Application
and	O
retpoline-based	O
machinery	O
was	O
incorporated	O
into	O
Linux	O
4.15	O
of	O
January	O
2018	O
.	O
</s>
<s>
On	O
2	O
March	O
2019	O
,	O
Microsoft	O
is	O
reported	O
to	O
have	O
released	O
an	O
important	O
Windows	O
10	O
(	O
v1809	O
)	O
software	O
mitigation	O
to	O
the	O
Spectre	B-Error_Name
v2	O
CPU	O
vulnerability	O
.	O
</s>
<s>
At	O
first	O
,	O
Spectre	B-Error_Name
patches	O
were	O
reported	O
to	O
significantly	O
slow	O
down	O
performance	O
,	O
especially	O
on	O
older	O
computers	O
.	O
</s>
<s>
Since	O
exploitation	O
of	O
Spectre	B-Error_Name
through	O
JavaScript	B-Language
embedded	O
in	O
websites	O
is	O
possible	O
,	O
it	O
was	O
planned	O
to	O
include	O
mitigations	O
against	O
the	O
attack	O
by	O
default	O
in	O
Chrome	B-Application
64	O
.	O
</s>
<s>
Chrome	B-Application
63	O
users	O
could	O
manually	O
mitigate	O
the	O
attack	O
by	O
enabling	O
the	O
Site	O
Isolation	O
feature	O
(	O
chrome://flags	O
#enable	O
-site-per-process	O
)	O
.	O
</s>
<s>
As	O
of	O
Firefox	B-Application
57.0.4	O
,	O
Mozilla	B-Operating_System
was	O
reducing	O
the	O
resolution	O
of	O
JavaScript	B-Language
timers	O
to	O
help	O
prevent	O
timing	O
attacks	O
,	O
with	O
additional	O
work	O
on	O
time-fuzzing	O
techniques	O
planned	O
for	O
future	O
releases	O
.	O
</s>
<s>
On	O
January	O
15	O
,	O
2018	O
,	O
Microsoft	O
introduced	O
mitigation	O
for	O
Spectre	B-Error_Name
in	O
Visual	O
Studio	O
.	O
</s>
<s>
ARM	B-Architecture
:	O
</s>
