arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1806.07480cs.OScs.ARcs.CR
收藏

LazyFP:使用微架构边通道泄漏FPU寄存器状态

LazyFP: Leaking FPU Register State using Microarchitectural Side-Channels

Julian Stecklina, Thomas Prescher

摘要:

现代处理器利用越来越大的寄存器集来促进有效的浮点和SIMD计算。这个大的寄存器集对于操作系统来说是一个负担,因为当操作系统上下文在任务之间切换时,需要保存和恢复其内容。作为优化,操作系统可以推迟FPU和SIMD寄存器集的上下文切换,直到执行需要访问这些寄存器的第一条指令。同时,旧的内容保留在原地,希望当前任务可能根本不使用这些寄存器。这种优化通常称为延迟FPU上下文切换。为了实现这一点,处理器提供了利用浮点和SIMD寄存器切换指令可用性的能力。如果指令被关闭,任何执行它们的尝试都会产生错误。在本文中,我们提出了一种攻击,利用懒惰FPU上下文切换,并允许对手恢复任意进程或VM的FPU和SIMD寄存器集。该攻击作用于瞬时执行FPU或SIMD指令的处理器,这些指令跟随生成错误的指令,指示首次使用FPU或SIMD指令。在使用惰性FPU上下文切换的操作系统上,其他进程或虚拟机的FPU和SIMD寄存器内容可以通过缓存副作用重建。随着SIMD寄存器不仅用于加密计算,而且越来越多地用于简单操作,如复制内存,我们认为,懒惰FPU上下文切换是一个危险的优化,需要关闭在所有操作系统,如果有机会,他们在受影响的处理器上运行。

英文摘要:

Modern processors utilize an increasingly large register set to facilitate efficient floating point and SIMD computation. This large register set is a burden for operating systems, as its content needs to be saved and restored when the operating system context switches between tasks. As an optimization, the operating system can defer the context switch of the FPU and SIMD register set until the first instruction is executed that needs access to these registers. Meanwhile, the old content is left in place with the hope that the current task might not use these registers at all. This optimization is commonly called lazy FPU context switching. To make it possible, a processor offers the ability to toggle the availability of instructions utilizing floating point and SIMD registers. If the instructions are turned off, any attempt of executing them will generate a fault. In this paper, we present an attack that exploits lazy FPU context switching and allows an adversary to recover the FPU and SIMD register set of arbitrary processes or VMs. The attack works on processors that transiently execute FPU or SIMD instructions that follow an instruction generating the fault indicating the first use of FPU or SIMD instructions. On operating systems using lazy FPU context switching, the FPU and SIMD register content of other processes or virtual machines can then be reconstructed via cache side effects. With SIMD registers not only being used for cryptographic computation, but also increasingly for simple operations, such as copying memory, we argue that lazy FPU context switching is a dangerous optimization that needs to be turned off in all operating systems, if there is a chance that they run on affected processors.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑