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]
Message-ID: <aHFoulc0HBUKQWzm@Asurada-Nvidia>
Date: Fri, 11 Jul 2025 12:40:42 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Jason Gunthorpe <jgg@...dia.com>
CC: <will@...nel.org>, <joro@...tes.org>, <kevin.tian@...el.com>,
	<baolu.lu@...ux.intel.com>, <linux-arm-kernel@...ts.infradead.org>,
	<iommu@...ts.linux.dev>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH rc] iommu/arm-smmu-v3: Revert vmaster in the error path

On Fri, Jul 11, 2025 at 01:42:26PM -0300, Jason Gunthorpe wrote:
> On Thu, Jul 10, 2025 at 04:30:03PM -0700, Nicolin Chen wrote:
> > The error path in the arm_smmu_attach_prepare() was introduced with the
> > arm_smmu_enable_iopf(). Due to a rebase issue, it forgot to include the
> > revert of the vmaster.
> > 
> > Move kfree(state->vmaster) to the error path, to prevent memory leak.
> > 
> > Fixes: cfea71aea921 ("iommu/arm-smmu-v3: Put iopf enablement in the domain attach path")
> > Cc: stable@...r.kernel.org
> > Signed-off-by: Nicolin Chen <nicolinc@...dia.com>
> > ---
> >  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> The patch is fine but the commit message is a bit confusing
> 
> The error path for err_free_master_domain leaks the vmaster. Move all
> the kfrees for vmaster into the goto error section..
> 
> Reviewed-by: Jason Gunthorpe <jgg@...dia.com>

OK. I will respin one fixing that.

Thanks!
Nicolin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ