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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y7S2erhj3xWUR6xH@ziepe.ca>
Date:   Tue, 3 Jan 2023 19:12:58 -0400
From:   Jason Gunthorpe <jgg@...pe.ca>
To:     Miaoqian Lin <linmq006@...il.com>
Cc:     Joerg Roedel <joro@...tes.org>, Will Deacon <will@...nel.org>,
        Robin Murphy <robin.murphy@....com>,
        Lu Baolu <baolu.lu@...ux.intel.com>,
        Eric Auger <eric.auger@...hat.com>,
        Kevin Tian <kevin.tian@...el.com>, iommu@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iommu: Fix refcount leak in iommu_device_claim_dma_owner

On Tue, Jan 03, 2023 at 10:30:17AM +0400, Miaoqian Lin wrote:
> iommu_group_get() returns the group with the reference incremented.
> Also an empty @owner is a more serious problem than refcount leak.
> Move iommu_group_get() after owner check to fix the refcount leak.
> 
> Fixes: 89395ccedbc1 ("iommu: Add device-centric DMA ownership interfaces")
> Signed-off-by: Miaoqian Lin <linmq006@...il.com>
> ---
> changes in v2:
> - Remove set NULL to group as suggested by Baolu Lu.
> - Update commit message according to Lu's explanation.
> ---
>  drivers/iommu/iommu.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@...dia.com>

Joerg, can you pick this for rc?

Thanks,
Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ