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: <48467507-877c-4789-85a9-932b0e79ed79@tuxon.dev>
Date:   Tue, 31 Oct 2023 09:24:59 +0200
From:   claudiu beznea <claudiu.beznea@...on.dev>
To:     Hangyu Hua <hbh25y@...il.com>, kristo@...nel.org,
        mturquette@...libre.com, sboyd@...nel.org, tony@...mide.com,
        dario.binacchi@...rulasolutions.com, claudiu.beznea@...rochip.com,
        robh@...nel.org, andriy.shevchenko@...ux.intel.com
Cc:     linux-omap@...r.kernel.org, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] ti: fix possible memory leak in
 _ti_omap4_clkctrl_setup()



On 27.10.2023 05:50, Hangyu Hua wrote:
> kstrndup() and kstrdup_and_replace() in clkctrl_get_name() can perform
> dynamic memory allocation. So clkctrl_name() needs to be freed when

s/clkctrl_name()/clkctrl_name

> provider->clkdm_name is NULL.
> 
> Fixes: bd46cd0b802d ("clk: ti: clkctrl: check return value of kasprintf()")
> Signed-off-by: Hangyu Hua <hbh25y@...il.com>
> ---
> 
> 	v2: fix commit info.
> 
>  drivers/clk/ti/clkctrl.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c
> index 607e34d8e289..cb4aa8a45bb2 100644
> --- a/drivers/clk/ti/clkctrl.c
> +++ b/drivers/clk/ti/clkctrl.c
> @@ -591,6 +591,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
>  		provider->clkdm_name = kasprintf(GFP_KERNEL,
>  						 "%s_clkdm", clkctrl_name);
>  		if (!provider->clkdm_name) {
> +			kfree(clkctrl_name);
>  			kfree(provider);
>  			return;
>  		}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ