]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: emulate: avoid accessing NULL ctxt->memopp
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Oct 2014 12:54:14 +0000 (14:54 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 Oct 2014 11:30:35 +0000 (13:30 +0200)
commita4d6fd3bd4f00b3deba986854240b4a911942ab5
tree33b03640ee6fa653470485c4e7691e0ea7fe3004
parent0b51d4cbceffc21bb5a496661e5e12559cad4bbf
KVM: emulate: avoid accessing NULL ctxt->memopp

A failure to decode the instruction can cause a NULL pointer access.
This is fixed simply by moving the "done" label as close as possible
to the return.

This fixes CVE-2014-8481.

Reported-by: Andy Lutomirski <luto@amacapital.net>
Cc: stable@vger.kernel.org
Fixes: aaade02e9f3996e965e97758ff8852b2da44a983
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c