summaryrefslogtreecommitdiff
path: root/Documentation/RCU
diff options
context:
space:
mode:
authorQuentin Casasnovas <quentin.casasnovas@oracle.com>2014-10-17 22:55:59 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-14 08:47:56 -0800
commit3ea61129fec62fbb7fba38e60d00e4f9d776cfa5 (patch)
tree73a0c4af929edbae9bbe6f2f54276862ca0776db /Documentation/RCU
parent6033d64297fac0c26284fe9b7ca8751906dcf277 (diff)
downloadlinux-3.10-3ea61129fec62fbb7fba38e60d00e4f9d776cfa5.tar.gz
linux-3.10-3ea61129fec62fbb7fba38e60d00e4f9d776cfa5.tar.bz2
linux-3.10-3ea61129fec62fbb7fba38e60d00e4f9d776cfa5.zip
kvm: fix excessive pages un-pinning in kvm_iommu_map error path.
commit 3d32e4dbe71374a6780eaf51d719d76f9a9bf22f upstream. The third parameter of kvm_unpin_pages() when called from kvm_iommu_map_pages() is wrong, it should be the number of pages to un-pin and not the page size. This error was facilitated with an inconsistent API: kvm_pin_pages() takes a size, but kvn_unpin_pages() takes a number of pages, so fix the problem by matching the two. This was introduced by commit 350b8bd ("kvm: iommu: fix the third parameter of kvm_iommu_put_pages (CVE-2014-3601)"), which fixes the lack of un-pinning for pages intended to be un-pinned (i.e. memory leak) but unfortunately potentially aggravated the number of pages we un-pin that should have stayed pinned. As far as I understand though, the same practical mitigations apply. This issue was found during review of Red Hat 6.6 patches to prepare Ksplice rebootless updates. Thanks to Vegard for his time on a late Friday evening to help me in understanding this code. Fixes: 350b8bd ("kvm: iommu: fix the third parameter of... (CVE-2014-3601)") Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com> Signed-off-by: Jamie Iles <jamie.iles@oracle.com> Reviewed-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/RCU')
0 files changed, 0 insertions, 0 deletions