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: <13a68f91-b691-4024-8ae8-5f108b4e4587@redhat.com>
Date: Thu, 19 Dec 2024 11:21:11 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Joe Hattori <joe@...is.s.u-tokyo.ac.jp>, sebastian.hesselbarth@...il.com,
 andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
 kuba@...nel.org
Cc: netdev@...r.kernel.org, dan.carpenter@...aro.org
Subject: Re: [PATCH v2] net: mv643xx_eth: fix an OF node reference leak

On 12/18/24 02:28, Joe Hattori wrote:
> Current implementation of mv643xx_eth_shared_of_add_port() calls
> of_parse_phandle(), but does not release the refcount on error. Call
> of_node_put() in the error path and in mv643xx_eth_shared_of_remove().
> 
> This bug was found by an experimental verification tool that I am
> developing.
> 
> Fixes: 76723bca2802 ("net: mv643xx_eth: add DT parsing support")
> Signed-off-by: Joe Hattori <joe@...is.s.u-tokyo.ac.jp>
> ---
> Changes in v3:
> - Insert a NULL check for port_platdev[n].
> Changes in v2:
> - Insert a NULL check before accessing the platform data.

I'm sorry for nit-picking, but many little things are adding-up and
should be noticed.

The subj prefix must include the correct revision number (v3 in this case).
You must avoid submitting new revisions within the 24h grace period, see:

https://elixir.bootlin.com/linux/v6.12.5/source/Documentation/process/maintainer-netdev.rst#L414

> ---
>  drivers/net/ethernet/marvell/mv643xx_eth.c | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
> index a06048719e84..0e2ebfcaad1c 100644
> --- a/drivers/net/ethernet/marvell/mv643xx_eth.c
> +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
> @@ -2705,8 +2705,14 @@ static struct platform_device *port_platdev[3];
>  static void mv643xx_eth_shared_of_remove(void)
>  {
>  	int n;
> +	struct mv643xx_eth_platform_data *pd;

Please respect the reverse xmas tree above, see:

https://elixir.bootlin.com/linux/v6.12.5/source/Documentation/process/maintainer-netdev.rst#L360

Otherwise LGTM, thanks!

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ