REDHAT-BUG-563463: High severity Linux KVM vulnerability
Paolo Bonzini found a bug in KVM that can be used to bypass proper permission checking while loading segment selectors. Malicious guest userspace process running in SMP guest can trick the emulator into loading kernel segment selector if it has access to IO port or MMIO region. To do so it should run legitimate instruction that does IO and will cause vcpu to enter emulator in one thread and replace this instruction to kernel selector loading one from another thread. If instruction is replaced after KVM entered emulator, but before instruction is fetched emulator will be tricked to execute privileged instruction without permission checking.
Affected Software
Event History
Frequently Asked Questions
Which systems are realistically exposed to exploitation?
The issue applies to SMP KVM guests where a malicious userspace process can access an I/O port or MMIO region. The attack requires coordination between threads in the same guest.
What does an attacker need to do to trigger the flaw?
The attacker must cause a vCPU to enter the emulator through a legitimate I/O instruction, then replace that instruction from another thread with one that loads a kernel segment selector before the emulator fetches it. This race can cause the emulator to execute the privileged instruction without the intended permission check.