Spectre v1 attacks, which exploit conditional branch misprediction, are often identified with attacks that bypass array bounds checking to leak data from a victim's memory. Generally, however, Spectre v1 attacks can exploit any conditional branch misprediction that makes the victim execute code incorrectly. In this paper, we investigate speculative type confusion, a Spectre v1 attack vector in which branch mispredictions make the victim execute with variables holding values of the wrong type and thereby leak memory content. We observe that speculative type confusion can be inadvertently introduced by a compiler, making it extremely hard for programmers to reason about security and manually apply Spectre mitigations. We thus set out to determine the extent to which speculative type confusion affects the Linux kernel. Our analysis finds exploitable and potentially-exploitable arbitrary memory disclosure vulnerabilities. We also find many latent vulnerabilities, which could become exploitable due to innocuous system changes, such as coding style changes. Our results suggest that Spectre mitigations which rely on statically/manually identifying "bad" code patterns need to be rethought, and more comprehensive mitigations are needed.
翻译:spectre v1 攻击, 利用有条件的分支误差, 往往被与绕行阵列限制检查从受害者记忆中泄漏数据的攻击区分开来。 但是, 一般来说, Spectre v1 攻击可以利用任何有条件的分支误差, 使受害者错误地执行代码。 在本文中, 我们调查投机型的混乱, 一种Spectre v1 攻击矢量, 使受害者使用错误类型的变量持有值, 从而泄漏内存内容。 我们观察到, 编译者可能会无意地引入投机型混淆, 使程序员极难理解安全性, 并手动应用 Spectre 减缓。 因此, 我们开始确定投机型混淆影响 Linux 内核的程度。 我们的分析发现, 有可能被利用的任意记忆披露弱点是许多潜在的弱点, 这些弱点可能由于系统变化的无关紧要性, 例如编译样式变化而变得可以被利用。 我们发现, 我们的结果表明, 光谱类的减轻作用取决于静态/ man 识别“ 坏” 代码模式需要重新思考, 并且需要更加全面的缓解。