]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: x86: Convert MSR_KVM_SYSTEM_TIME to use gfn_to_hva_cache functions (CVE-2013...
authorAndy Honig <ahonig@google.com>
Wed, 20 Feb 2013 22:48:10 +0000 (14:48 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Apr 2013 04:23:48 +0000 (21:23 -0700)
commitdf0ed3450c217a1cd571c0d4efa4dc6c458894a9
tree6498680c464a42e6b54f34f47f030ac0c0e6a64f
parentd7709255affba50d2ff4087d28308e03d1154afa
KVM: x86: Convert MSR_KVM_SYSTEM_TIME to use gfn_to_hva_cache functions (CVE-2013-1797)

commit 0b79459b482e85cb7426aa7da683a9f2c97aeae1 upstream.

There is a potential use after free issue with the handling of
MSR_KVM_SYSTEM_TIME.  If the guest specifies a GPA in a movable or removable
memory such as frame buffers then KVM might continue to write to that
address even after it's removed via KVM_SET_USER_MEMORY_REGION.  KVM pins
the page in memory so it's unlikely to cause an issue, but if the user
space component re-purposes the memory previously used for the guest, then
the guest will be able to corrupt that memory.

Tested: Tested against kvmclock unit test

Signed-off-by: Andrew Honig <ahonig@google.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/x86.c