Row Hammer is an exploit which relies on RAM defects to get unrestricted access to the RAM content, allowing to read/write otherwise protected memory and to get higher privileges on the system.
To work, this exploit will access a legitimately accessible memory row in a loop at a very high rate and with no cache, and the frequency of this operation will induce a change in the value of the adjacent, restricted row.
Wikipedia describes the exploit as follow:
By combining the disturbance errors with memory spraying, this exploit is capable of altering page table entries (PTEs) used by the virtual memory system for mapping virtual addresses to physical addresses, which results in the exploit gaining unrestricted memory access.
As per my understanding, while this exploit may be able to provide the attacker a Super User privilege on a guest system (I do not talk about "root" since this attack is not OS dependent), I'm wondering if it can really allow him to escape the virtualized guest and reach either other guests or the host system itself.
- While this attack is described as providing "unrestricted access to all physical memory installed in a computer", this memory must still be addressable by the malicious process. As per my understanding a guest virtualized "physical" memory is mapped onto a region of the actual physical memory and several measures exists, both at the hardware (CPU with hardware-assited virutalization instruction sets) and the software (the virtualization software) layers, to ensure it will not be able to address memory outside of this area.
- In order to access normally restricted memory areas, the process has to modify the PTEs. Within the guest, only the PTEs of the guest system is accessible, not the PTEs of the host one.
- There is a chicken-and-egg problem: in order to circumvent the memory access enforced by the virtualization software, the process must alter its memory. However, since the virtualization software is running on the host system, the malicious process must first be able to address host system memory in order to do this.
- Wikipedia's definition mentions modifying the PTEs (Page Table Entries). Modern CPUs provide Second Level Address Tanslation (SLAT, aka nested paging to isolate guest's page tables at the hardware level). Would my assumptions above be bypassable, would this improve the resistance of virtualized systems against Row Hammer?