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: <425fd8a4-2a91-4755-a9fe-eef679b92f9e@kernel.org>
Date: Mon, 21 Jul 2025 10:25:28 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: jackysliu <1972843537@...com>, markus.elfring@....de
Cc: andreas@...sler.com, davem@...emloft.net, linux-kernel@...r.kernel.org,
 sparclinux@...r.kernel.org
Subject: Re: [PATCH v2] arch: fix resource leak in jbusmc_probe()

On 21/07/2025 05:57, jackysliu wrote:
> From: Siyang Liu <1972843537@...com>
> 
> In the jbusmc_probe function, the device node mem_node fetched
> via of_find_node_by_path("/memory") is not properly freed
> on all code paths.
> This can lead to leakage of device node reference counts,
> which may result in kernel resources not being released.

Please wrap commit message according to Linux coding style / submission
process (neither too early nor over the limit):
https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597


Do not attach (thread) your patchsets to some other threads (unrelated
or older versions). This buries them deep in the mailbox and might
interfere with applying entire sets.

> 
> This issue was detected by rule based static tools
> developed by Tencent.

What tools? This must be specific, give their name.

Previously Tencent reports were often bogus or low quality.

> 
> Signed-off-by: Siyang Liu <1972843537@...com>
> ---
>  arch/sparc/kernel/chmc.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/sparc/kernel/chmc.c b/arch/sparc/kernel/chmc.c
> index d4c74d6b2e1b..fd20e4ee0971 100644
> --- a/arch/sparc/kernel/chmc.c
> +++ b/arch/sparc/kernel/chmc.c
> @@ -412,7 +412,7 @@ static int jbusmc_probe(struct platform_device *op)
>  	mem_regs = of_get_property(mem_node, "reg", &len);
>  	if (!mem_regs) {
>  		printk(KERN_ERR PFX "Cannot get reg property of /memory node.\n");
> -		goto out;
> +		goto out_put;

You did not implement at all what I asked. I wanted the code to be
simpler, you just made it more complicated. Read again previous feedback.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ