]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: prevent DBG_DECRYPT and DBG_ENCRYPT overflow
authorDavid Rientjes <rientjes@google.com>
Mon, 25 Mar 2019 18:47:31 +0000 (11:47 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 5 Apr 2019 18:49:42 +0000 (20:49 +0200)
commitfed45cfdbd7e1364ba718bac50a11a753e40e8af
tree0744c853c7f9e063f9349963b306eb0bef0d72a4
parent7fee47972241b1e63658279f509366f529e779f8
KVM: SVM: prevent DBG_DECRYPT and DBG_ENCRYPT overflow

This ensures that the address and length provided to DBG_DECRYPT and
DBG_ENCRYPT do not cause an overflow.

At the same time, pass the actual number of pages pinned in memory to
sev_unpin_memory() as a cleanup.

Reported-by: Cfir Cohen <cfir@google.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c