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: <f8bf91a3fbbe213f0bf0e63aa7cdf86c.sboyd@kernel.org>
Date: Wed, 21 Feb 2024 20:27:06 -0800
From: Stephen Boyd <sboyd@...nel.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>, Dongjiu Geng <gengdongjiu@...wei.com>, Michael Turquette <mturquette@...libre.com>
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org, Christophe JAILLET <christophe.jaillet@...adoo.fr>, linux-clk@...r.kernel.org
Subject: Re: [PATCH] clk: hisilicon: hi3559a: Fix an erroneous devm_kfree()

Quoting Christophe JAILLET (2024-01-21 07:16:24)
> 'p_clk' is an array allocated just before the for loop for all clk that
> need to be registered.
> It is incremented at each loop iteration.
> 
> If a clk_register() call fails, 'p_clk' may point to something different
> from what should be freed.
> 
> The best we can do, is to avoid this wrong release of memory.
> 
> Fixes: 6c81966107dc ("clk: hisilicon: Add clock driver for hi3559A SoC")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---

Applied to clk-next

About doing the right thing, it seems OK to remove the free for now
because the code continues on anyway.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ