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: <ZtgzE73M49BnMHYh@iZbp1asjb3cy8ks0srf007Z>
Date: Wed, 4 Sep 2024 18:14:43 +0800
From: Qianqiang Liu <qianqiang.liu@....com>
To: Ethan Zhao <haifeng.zhao@...ux.intel.com>
Cc: dwmw2@...radead.org, baolu.lu@...ux.intel.com, iommu@...ts.linux.dev,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iommu/vt-d: Fix 'Null pointer dereferences' issue

Hi Ethan,

No, I don’t hit any issues so far.
It was scanned by Coverity, and I tried to fix it.
If you think it's not an issue, we can just ignore it.

On Wed, Sep 04, 2024 at 05:49:49PM +0800, Ethan Zhao wrote:
> 
> On 9/3/2024 10:46 PM, Qianqiang Liu wrote:
> > Passing null pointer "pdev" to "pci_enable_pasid", which dereferences it.
> > Check the "pdev" is null or not before passing to "pci_enable_pasid".
> > 
> > Signed-off-by: Qianqiang Liu <qianqiang.liu@....com>
> > ---
> >   drivers/iommu/intel/iommu.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
> > index 9f6b0780f2ef..a1e54f334330 100644
> > --- a/drivers/iommu/intel/iommu.c
> > +++ b/drivers/iommu/intel/iommu.c
> > @@ -3935,7 +3935,7 @@ static struct iommu_device *intel_iommu_probe_device(struct device *dev)
> >   	 * So always enable PASID support on devices which have it, even if
> >   	 * we can't yet know if we're ever going to use it.
> >   	 */
> > -	if (info->pasid_supported &&
> > +	if (info->pasid_supported && pdev &&
> >   	    !pci_enable_pasid(pdev, info->pasid_supported & ~1))
> 
> You hit any issue with specific ver kernel ? seems impossible to hit
> such NULL pointer issue with the latest kernel for which you sent
> this patch.
> 
> Thanks,
> Ethan
> 
> >   		info->pasid_enabled = 1;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ