Research

Is Your CPU Leaking Sensitive Data?

In a recent turn of events, Intel and AMD are once again under the cybersecurity spotlight, with critical vulnerabilities found in their CPUs, challenging the notion of hardware-level security in modern computing.

First Published 2nd January 2024

Is Your CPU Leaking Sensitive Data

Data streaming.

5 min read  |  Reflare Research Team

Microarchitecture Mischief

Intel has recently fixed a critical vulnerability in its current generation of CPUs, spanning across desktop, server, mobile, and embedded platforms. This fix includes CPUs based on the Alder Lake, Raptor Lake, and Sapphire Rapids microarchitectures.

The vulnerability, identified as CVE-2023-23583, poses a significant threat as it allows attackers to elevate privileges, access sensitive data, or cause a denial of service. Intel's internal research found that the issue arises when an instruction, specifically REP MOVSB, is encoded with an unnecessary REX prefix. This could lead to erratic system behaviour, including crashes or hangs. In rarer cases, it might enable privilege escalation from CPL3 to CPL0.

Intel emphasised that this problem is unlikely to affect non-malicious real-world software, as redundant REX prefixes are not commonly present in code and are not generated by standard compilers.

Following the discovery, Intel has released microcode updates for other CPUs. Users are advised to update their BIOS, operating system, and drivers.

Separately, vulnerability researcher Tavis Ormandy revealed that this security bug, nicknamed Reptar, was independently discovered by several Google research teams. This vulnerability involves the CPU misinterpreting redundant prefixes, potentially bypassing security barriers if exploited.

Ormandy's tests uncovered unusual behaviours, such as unpredictable branching and inaccurate recording of the instruction pointer in certain instructions. Continued testing showed that when multiple cores were affected, the processor reported machine check exceptions and halted.

Finding Zen

Tavis Ormandy is the same researcher at Google who, just several months ago, uncovered a serious flaw in AMD CPUs known as Zenbleed.

Zenbleed is a security vulnerability affecting AMD processors based on the Zen 2 microarchitecture, including certain EPYC CPUs used in data centres and Ryzen/Threadripper CPUs in desktop and laptop computers

The Zenbleed vulnerability is classified as a speculative execution bug, which is a type of vulnerability that leverages the CPU process known as speculative execution to access sensitive information.

This differs somewhat from previous speculative execution side channel bugs like Meltdown and Spectre. Zenbleed allows attackers to exfiltrate information from sibling processes or Virtual Machines (VMs) without requiring special privileges.

This means an attacker could potentially access sensitive data, such as passwords, SSH keys, and other confidential information, being processed in another application or VM on the same machine.

The vulnerability results from an issue with CPU hardware, specifically involving the handling of Advanced Vector Extensions (AVX) registers. These registers are used in operations involving sensitive data.

The Zenbleed attack exploits the speculative execution to reset the z-bit flag and dump the content of a register, potentially compromising the data of other processes on the same physical core.

The Patch-Up

To address this vulnerability, the recommended solution is to update the CPU microcode. This can be achieved by updating the machine's BIOS or applying a patch at OS kernel load time. New Linux kernels have been released to address the Zenbleed vulnerability, and it's advised that these kernels be upgraded as soon as possible.

This applies to server infrastructure and developer machines running Linux. For other operating systems like Windows, it's important to check with the OS vendor for available patches.

The vulnerability is considered serious as it affects a wide range of AMD's products and can potentially allow attackers to steal sensitive data like encryption keys and login credentials.

AMD has released microcode updates to mitigate this vulnerability for its Zen 2 family of CPUs, with patches already available for some products and others expected to be released in the near future.

The CPU Chronicles

The discovery of Reptar and Zenbleed adds to a series of notable chip-affecting vulnerabilities that have been identified in recent years. These vulnerabilities, including the likes of Rowhammer, Meltdown, Spectre, and others, have revealed the intricate complexities and risks inherent in modern processor architectures.

Each of these exploits different aspects of CPU design and operation, demonstrating that advancing processing capabilities often comes with increased security risks.

Rowhammer: The Rowhammer vulnerability emerges from a physical flaw in DRAM chips, where repeated access to a memory row causes electrical interference in adjacent rows. This can lead to bit flips in these neighbouring rows, potentially corrupting memory and breaching security. DRAM, a common type of volatile computer memory, stores data in cells of capacitors and transistors. Due to the close physical proximity of memory cells in modern densely packed DRAM chips, Rowhammer can exploit this layout for malicious purposes.

Meltdown: Meltdown exploits the out-of-order execution in microprocessors, a technique intended to enhance CPU efficiency by processing instructions as soon as resources are available, regardless of their original sequence.  Out-of-order execution, while boosting processing speed, creates the potential for speculative instructions to perform operations that wouldn't occur in a correctly ordered execution. This vulnerability allows unauthorised reading of all system memory, including kernel space, thus breaking the fundamental memory isolation between user applications and the operating system.

Spectre: This exploit takes advantage of branch prediction and speculative execution in CPUs, techniques designed to speed up processing by guessing the direction of branches in code and executing instructions ahead of time. If the guess is wrong, the results are discarded. However, Spectre manipulates this process to force the execution of instructions that leak data from other programs. This exploit shows how performance features like speculative execution can be turned against security measures.

Foreshadow: Foreshadow targets Intel's SGX (Software Guard Extensions) technology, which allows applications to create secure memory regions called enclaves, supposed to be safe even if the rest of the system is compromised. However, Foreshadow leverages a vulnerability in 'lazy FP state restore' for managing floating-point registers, enabling malicious programs to infer values stored in these protected enclaves, thus breaching what should be a robust isolation.

ZombieLoad: As part of the Microarchitectural Data Sampling (MDS) vulnerabilities, ZombieLoad exploits flaws in microarchitectural buffers inside Intel CPUs. These small memory pools, like the fill buffer and load buffer, are used to hold instructions and data temporarily for internal efficiency. ZombieLoad targets these buffers to access data being processed by other applications on the same machine, potentially leaking sensitive information.

RIDL and Fallout: RIDL (Rogue In-Flight Data Load) and Fallout are MDS vulnerabilities that exploit speculative execution technology in Intel processors to leak data from internal CPU buffers like Line Fill Buffers and Store Buffers. These buffers, essential for memory operations and data transfer within the CPU, become vulnerable, allowing attackers to infer sensitive data being processed or stored temporarily.

CacheOut: CacheOut is a nuanced attack allowing attackers to selectively leak data from the CPU's L1 data cache, a small, high-speed cache memory close to the CPU core. The L1 cache is vital for processor performance, storing frequently accessed data to minimise access time. CacheOut's ability to target specific data in this cache makes it a more potent threat than prior attacks.

PLATYPUS: PLATYPUS attacks leverage power side-channels in Intel CPUs, which adjust their power consumption based on workload for energy efficiency. By observing these power variations, PLATYPUS can infer the type of operations being performed by the CPU, potentially revealing sensitive data. This technique exposes the vulnerabilities in the power management mechanisms of modern processors.

Spectre-BHB (Branch History Injection): Spectre-BHB involves injecting malicious branch history into a CPU's branch prediction unit, misleading it into speculative execution paths that can be exploited to leak sensitive data [13]. The branch history buffer, part of the CPU's branch prediction unit, is designed to improve processing efficiency by anticipating program paths. However, Spectre-BHB demonstrates how these predictions can be manipulated to breach security across different privilege levels.

Stay up-to-date on the latest cybersecurity trends and analysis with your Reflare Research Newsletter subscription. You can also explore some of our related articles below to learn more.

Subscribe by email