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] [thread-next>] [day] [month] [year] [list]
Message-ID: <f7a83c28-af17-7479-0b39-ff3b06ee4b8c@huawei.com>
Date: Mon, 24 Nov 2025 10:03:03 +0800
From: liulongfang <liulongfang@...wei.com>
To: Johan Hovold <johan@...nel.org>, Weili Qian <qianweili@...wei.com>, Zhou
 Wang <wangzhou1@...ilicon.com>, Herbert Xu <herbert@...dor.apana.org.au>,
	"David S . Miller" <davem@...emloft.net>
CC: Kai Ye <yekai13@...wei.com>, <linux-crypto@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <stable@...r.kernel.org>
Subject: Re: [PATCH] crypto: hisilicon/qm - fix device leak on QoS updates

On 2025/11/21 19:11, Johan Hovold wrote:
> Make sure to drop the reference taken when looking up the PCI device on
> QoS updates.
> 
> Fixes: 22d7a6c39cab ("crypto: hisilicon/qm - add pci bdf number check")
> Cc: stable@...r.kernel.org	# 6.2
> Cc: Kai Ye <yekai13@...wei.com>
> Signed-off-by: Johan Hovold <johan@...nel.org>
> ---
>  drivers/crypto/hisilicon/qm.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
> index a5b96adf2d1e..ef6fdcc3dbcb 100644
> --- a/drivers/crypto/hisilicon/qm.c
> +++ b/drivers/crypto/hisilicon/qm.c
> @@ -3871,11 +3871,14 @@ static ssize_t qm_get_qos_value(struct hisi_qm *qm, const char *buf,
>  	pdev = container_of(dev, struct pci_dev, dev);
>  	if (pci_physfn(pdev) != qm->pdev) {
>  		pci_err(qm->pdev, "the pdev input does not match the pf!\n");
> +		put_device(dev);
>  		return -EINVAL;
>  	}
>  
>  	*fun_index = pdev->devfn;
>  
> +	put_device(dev);
> +
>  	return 0;
>  }
>  
> 

This issue has already been fixed by the following patch:
"[PATCH] crypto: hisilicon/qm - Fix device reference leak in qm_get_qos_value".

Thanks.
Longfang.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ