From: Nadav Amit Date: Thu, 18 Sep 2014 19:39:39 +0000 (+0300) Subject: KVM: x86: Handle errors when RIP is set during far jumps X-Git-Tag: fixes-against-v3.18-rc2~9^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1442d85cc30ea75f7d399474ca738e0bc96f715;p=pandora-kernel.git KVM: x86: Handle errors when RIP is set during far jumps Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not handle this case, and may result in failed vm-entry once the assignment is done. The tricky part of doing so is that loading the new CS affects the VMCS/VMCB state, so if we fail during loading the new RIP, we are left in unconsistent state. Therefore, this patch saves on 64-bit the old CS descriptor and restores it if loading RIP failed. This fixes CVE-2014-3647. Cc: stable@vger.kernel.org Signed-off-by: Nadav Amit Signed-off-by: Paolo Bonzini --- Reading git-diff-tree failed