Of ghost paper
7 Mitigation Options
The vulnerability of a conditional branch can be mitigated if speculative execution can be suspended on potentially dependent execution paths.
This means that if you have code like
if (security critical check)
execute critical code
else
do not execute critical code
then you need to place the serialization instruction right in front of the critical security code:
if (security critical check)
lfence
execute critical code
else
do not execute critical code
to avoid speculating on checking for potential information leakage.
In Specter # 2, an attacker controls an โentry point,โ where the CPU assumes that execution will continue. Assuming
lfence
critical code
doesnโt help, because the attacker doesnโt need to call a prediction to target on lfence, they can directly set it to critical code.
source
share