lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 5 Oct 2018 10:31:01 +0200
From:   Joerg Roedel <joro@...tes.org>
To:     "Singh, Brijesh" <brijesh.singh@....com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
        "Lendacky, Thomas" <Thomas.Lendacky@....com>,
        Borislav Petkov <bp@...e.de>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        "# 4 . 14+" <stable@...r.kernel.org>
Subject: Re: [PATCH] iommu/amd: Clear memory encryption mask from physical
 address

On Thu, Oct 04, 2018 at 09:40:23PM +0000, Singh, Brijesh wrote:
> Boris Ostrovsky reported a memory leak with device passthrough when SME
> is active.
> 
> The VFIO driver uses iommu_iova_to_phys() to get the physical address for
> an iova. This physical address is later passed into vfio_unmap_unpin() to
> unpin the memory. The vfio_unmap_unpin() uses pfn_valid() before unpinning
> the memory. The pfn_valid() check was failing because encryption mask was
> part of the physical address returned. This resulted in the memory not
> being unpinned and therefore leaked after the guest terminates.
> 
> The memory encryption mask must be cleared from the physical address in
> iommu_iova_to_phys().

Merged and on its way upstream, thanks Brijesh.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ