KVM: x86: PREFETCH and HINT_NOP should have SrcMem flag
authorNadav Amit <namit@cs.technion.ac.il>
Mon, 13 Oct 2014 10:04:14 +0000 (13:04 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 Oct 2014 11:30:36 +0000 (13:30 +0200)
commit3f6f1480d86bf9fc16c160d803ab1d006e3058d5
tree988959255d9ac2f34c7fbc95af889f31ee4ef9d0
parent13e457e0eebf0a0c82c38ceb890d93eb826d62a6
KVM: x86: PREFETCH and HINT_NOP should have SrcMem flag

The decode phase of the x86 emulator assumes that every instruction with the
ModRM flag, and which can be used with RIP-relative addressing, has either
SrcMem or DstMem.  This is not the case for several instructions - prefetch,
hint-nop and clflush.

Adding SrcMem|NoAccess for prefetch and hint-nop and SrcMem for clflush.

This fixes CVE-2014-8480.

Fixes: 41061cdb98a0bec464278b4db8e894a3121671f5
Cc: stable@vger.kernel.org
Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c