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: <0774bf0f-5686-46ab-bd71-82b859201353@kernel.org>
Date: Thu, 31 Jul 2025 12:59:43 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: "zhen.ni" <zhen.ni@...ystack.cn>, alim.akhtar@...sung.com
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH] memory: samsung: exynos-srom: Fix of_iomap leak in
 exynos_srom_probe

On 31/07/2025 11:40, zhen.ni wrote:
> Hi,
> 
> During static analysis with Smatch, I identified the following issue:
> 
> ```
> drivers/memory/samsung/exynos-srom.c:155 exynos_srom_probe()
> warn: 'srom->reg_base' from of_iomap() not released on lines: 155.

Nothing in commit msg explained you used Smatch. You must describe the
tools you use.

> ```
> 
> Problem analysis:
> 1. In exynos_srom_probe(), the reg_base resource is acquired via of_iomap()
> 2. The of_platform_populate() call at the end of the function has a 
> possible failure path:

Above is AI/LLM output?

> ```
> root = root ? of_node_get(root) : of_find_node_by_path("/");
> if (!root)
>       return -EINVAL; // Failure return point
> ```
> 3. When this path is taken, reg_base is not released, causing a resource 
> leak
> 
> Verification:
> After applying the patch, the Smatch warning is resolved

This means no testing. You should mention it as well.

Don't top post. See netiquette.


Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ