All AMD Zen CPUs Vulnerable, Might Need to Disable SMT
Modern out-of-order superscalar microprocessors improve performance in a number of ways. Simultaneous multithreading (running multiple threads of code on a CPU core) is one of the most efficient ways to improve processor performance.
However, AMD’s implementation of SMT appears to be vulnerable to the so-called SQUIP side-channel attack, which can reveal 4096-bit RSA keys fairly quickly.
All of AMD’s Zen microarchitectures feature separate scheduler queues for each execution unit (as do Apple’s M1 series CPUs). Each of these schedulers maintains a separate queue from where uops are issued to the corresponding execution unit. AMD’s scheduler with SMT enabled interferes with the overall workload. This allows you to observe scheduler queue contention via performance counters and non-serialized timer reads between sibling threads on the same core. Such priming and probing allows side-channel attacks against the scheduler queue. Researchers call method scheduler queue utilization (that is, occupancy) via interference probing. squip.
This vulnerability affects all existing Ryzen processors from AMD with Zen 1/2/3 microarchitectures. To exploit this vulnerability to access data processed on the same CPU core, an attacker would first have to run malicious code on that CPU core, which is not particularly trivial. On the other hand, to fully mitigate SQUIP would require disabling his SMT technology on all of AMD’s existing Zen-based processors, resulting in a significant performance hit.
Daniel Gruss, a computer researcher at Graz University of Technology, explains:conversation with register“Apple’s M1 (and presumably M2 as well) will follow the same design, but they haven’t introduced SMT in their CPUs yet, so it won’t affect them.”
AMD Reportedly Confirms Issue — Now Called AMD-SB-1039: Execution Unit Scheduler Contention Side-Channel Vulnerability in AMD Processors — The company says it considers this a “moderate severity” threat.
“AMD encourages software developers to adopt existing best practices that help mitigate this potential vulnerability, including constant-time algorithms, and avoid control flows that rely on secrets where necessary. is recommended.”