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: <e4ad92b88556f0de05b6b7ae03da1e581d688ce5.camel@linaro.org>
Date: Tue, 07 May 2024 17:42:45 +0100
From: André Draszik <andre.draszik@...aro.org>
To: Marek Szyprowski <m.szyprowski@...sung.com>, linux-clk@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: Russell King <linux@...linux.org.uk>, Michael Turquette
	 <mturquette@...libre.com>, Stephen Boyd <sboyd@...nel.org>
Subject: Re: [PATCH] clkdev: fix potential NULL pointer dereference

Hi Marek,

On Tue, 2024-05-07 at 08:44 +0200, Marek Szyprowski wrote:
> diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
> index ddacab7863d0..d2801ae70e34 100644
> --- a/drivers/clk/clkdev.c
> +++ b/drivers/clk/clkdev.c
> @@ -194,10 +194,12 @@ vclkdev_alloc(struct clk_hw *hw, const char *con_id, const char *dev_fmt,
>  	return &cla->cl;
>  
>  fail:
> -	fmt.fmt = dev_fmt;
> -	fmt.va = &ap_copy;
> -	pr_err("%pV:%s: %s ID is greater than %zu\n",
> -	       &fmt, con_id, failure, max_size);
> +	if (dev_fmt) {
> +		fmt.fmt = dev_fmt;
> +		fmt.va = &ap_copy;
> +		pr_err("%pV:%s: %s ID is greater than %zu\n",
> +		       &fmt, con_id, failure, max_size);
> +	}

It might be nice to still print the rest of the error, so it's easier to see which
clock is causing trouble.

Cheers,
Andre'


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ