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: <175572873285.1571546.13547404345424444866.robh@kernel.org>
Date: Wed, 20 Aug 2025 18:31:15 -0500
From: "Rob Herring (Arm)" <robh@...nel.org>
To: Lizhi Hou <lizhi.hou@....com>
Cc: lpieralisi@...nel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] of: dynamic: Fix memleak when of_pci_add_properties()
 failed


On Mon, 18 Aug 2025 08:22:21 -0700, Lizhi Hou wrote:
> When of_pci_add_properties() failed, of_changeset_destroy() is called to
> free the changeset. And of_changeset_destroy() puts device tree node in
> each entry but does not free property in the entry. This leads to memory
> leak in the failure case.
> 
> In of_changeset_add_prop_helper(), add the property to the device tree node
> deadprops list. Thus, the property will also be freed along with device
> tree node.
> 
> Fixes: b544fc2b8606 ("of: dynamic: Add interfaces for creating device node dynamically")
> Reported-by: Lorenzo Pieralisi <lpieralisi@...nel.org>
> Closes: https://lore.kernel.org/all/aJms+YT8TnpzpCY8@lpieralisi/
> Tested-by: Lorenzo Pieralisi <lpieralisi@...nel.org>
> Signed-off-by: Lizhi Hou <lizhi.hou@....com>
> ---
>  drivers/of/dynamic.c | 3 +++
>  1 file changed, 3 insertions(+)
> 

Applied, thanks!


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ