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: <5355d837-4777-40cf-8a9a-08c9509d3fc5@gmail.com>
Date: Sun, 20 Oct 2024 14:41:02 +0200
From: Javier Carrasco <javier.carrasco.cruz@...il.com>
To: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Cc: Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
 Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 linux-arm-msm@...r.kernel.org, linux-usb@...r.kernel.org,
 linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] usb: typec: qcom-pmic-typec: fix missing fwnode removal
 in error path

On 20/10/2024 12:40, Dmitry Baryshkov wrote:
> On Sat, Oct 19, 2024 at 11:10:51PM +0200, Javier Carrasco wrote:
>> If drm_dp_hpd_bridge_register() fails, the probe function returns
>> without removing the fwnode via fwnode_remove_software_node(), leaking
>> the resource.
>>
>> Jump to fwnode_remove if drm_dp_hpd_bridge_register() fails to remove
>> the software node acquired with device_get_named_child_node().
> 
> I think the fwnode_remove_software_node() is not a proper cleanup
> function here (and was most likely c&p from some other driver). See the
> comment in front of device_get_named_child_node().
> 
> Please add another patch before this one, replacing
> fwnode_remove_software_node() with fwnode_handle_put().
> 

That is right, it was probably copied from a driver that called
fwnode_create_software_node() to initialize the fwnode. I will replace
it in the probe function as well as in qcom_pmic_typec_remove(), where
the fwnode is again released via fwnode_remove_software_node().

Thanks and best regards,
Javier Carrasco

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ