A new Foreshadow attack affects Intel, AMD, IBM and ARM processors

A group of researchers from Graz University of Technology in Austria and the Helmholtz Centre for Information Security (CISPA) have identified a new Foreshadow (L1TF) attack vector that allows data to be extracted from the memory of Intel SGX enclaves, SMM, operating system kernel memory areas, and virtual machines in virtualization systems.

Unlike the original Foreshadow attack, the new variant is not specific to Intel processors and affects CPUs from other manufacturers such as ARM, IBM, and AMD. Furthermore, the new variant does not require high performance and the attack can be carried out even by running JavaScript and WebAssembly in a web browser.

Foreshadow takes advantage of the fact that when memory is accessed at a virtual address , which generates an exception (terminal page fault), the processor speculatively calculates the physical address and loads the data if it is in the L1 cache.

Speculative access is performed before the memory page table iteration is complete and regardless of the state of the memory page table entry (PTE), i.e., before verifying that the data is in physical memory and readable.

After completing the memory availability check , in the absence of the Present indicator in the PTE, the operation is discarded, but the data is deposited into the cache and can be retrieved using methods to determine the cache contents through side channels (by analyzing changes in access time to cached and non-cached data).

Researchers have shown that existing methods of protection against Foreshadow are ineffective and are implemented with an incorrect interpretation of the problem.

The Foreshadow vulnerability can be exploited regardless of the use of kernel protection mechanisms that were previously considered sufficient.

As a result, the researchers demonstrated the possibility of performing a Foreshadow attack on systems with relatively old kernels , in which all available Foreshadow protection modes are enabled, as well as with new kernels, in which only Spectre-v2 protection is disabled (using the Linux kernel option nospectre_v2).

The prefetch effect has been found to be unrelated to software prefetch instructions or hardware prefetch effect during memory access, but rather arises from speculative dereference of user space registers in the kernel.

This misinterpretation of the cause of the vulnerability initially led to the assumption that data leakage in Foreshadow can only occur through the L1 cache, while the presence of certain code snippets (prefetch devices) in the kernel it can contribute to data leakage out of the L1 cache, for example in L3 Cache.

The revealed feature also opens up opportunities to create new attacks aimed at translating virtual addresses to physical addresses in isolated environments and determining addresses and data stored in CPU registers.

As demonstrations , the researchers showed the possibility of using the revealed effect to extract data from one process to another with a throughput of approximately 10 bits per second on a system with an Intel Core i7-6500U CPU.

It also shows the possibility of filtering the contents of the Intel SGX enclave registers (it took 15 minutes to determine a 32-bit value written to a 64-bit register).

To block the Foreshadow attack through the L3 cache, the Spectre-BTB (Branch Target Buffer) protection method implemented in the retpoline patch set is effective.

Therefore, the researchers believe it is necessary to leave retpoline enabled even on systems with new CPUs, which already have protection against known vulnerabilities in the speculative execution mechanism of CPU instructions.

For their part, Intel representatives said they do not plan to add additional Foreshadow protection measures to the processors and consider the current protection against Spectre V2 and L1TF (Foreshadow) attacks sufficient.

Source: https://arxiv.org


Add as preferred source in Google