REDHAT-BUG-559091: High severity KVM KVM vulnerability
Gleb Natapov found a bug in KVM that allows code that runs in CPL3 (inside a guest) to modify memory in CPL0 (inside a guest). The bug is in x86 emulator code. When emulator accesses guest's memory on behalf of the gust's code it does this with the CPL0 privilege, so if emulated instruction is executed by unprivileged code it can still modify memory that otherwise is not accessible to it. To tak advantage of this vulnerability malicious code should trick KVM to emulate malicious instruction. KVM emulates IO and MMIO instructions, so if unprivileged process has access to some IO port or MMIO region (framebuffer for instance) the bug is very easy to use to modify arbitrary location in kernel memory.
Affected Software
Event History
Frequently Asked Questions
Who is realistically exposed to this issue?
Guests running on KVM are exposed when unprivileged CPL3 code in a guest can access an I/O port or MMIO region. A framebuffer is given as an example of an MMIO region that can make exploitation easy.
What does an attacker need to exploit it?
An attacker needs to run malicious unprivileged code inside a guest and cause KVM to emulate a malicious instruction. KVM emulates I/O and MMIO instructions, and access to an available I/O port or MMIO region enables the attacker to target kernel memory within that guest.
What is the impact within the guest?
The flaw allows code executing at CPL3 to modify memory at CPL0 privilege inside the same guest. This can allow modification of arbitrary kernel-memory locations when the required emulated I/O or MMIO access is available.