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: <ad029a9a-f61b-60e2-1e6d-ddf435e2a37c@ti.com>
Date:	Wed, 10 Aug 2016 13:56:53 +0300
From:	Tomi Valkeinen <tomi.valkeinen@...com>
To:	Dan Carpenter <dan.carpenter@...cle.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
	Robert Jarzmik <robert.jarzmik@...e.fr>
CC:	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	"Luis R. Rodriguez" <mcgrof@...e.com>,
	<linux-fbdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<kernel-janitors@...r.kernel.org>
Subject: Re: [patch] video: fbdev: pxafb: potential NULL dereference on error


On 15/07/16 14:07, Dan Carpenter wrote:
> If we "goto out;" then it calls display_timings_release(timings);
> Since "timings" is NULL, that's going to oops.  Just return directly.
> 
> Fixes: 420a488278e8 ('video: fbdev: pxafb: initial devicetree conversion')
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> 
> diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
> index 2c0487f..ed41fdb 100644
> --- a/drivers/video/fbdev/pxafb.c
> +++ b/drivers/video/fbdev/pxafb.c
> @@ -2125,7 +2125,7 @@ static int of_get_pxafb_display(struct device *dev, struct device_node *disp,
>  
>  	timings = of_get_display_timings(disp);
>  	if (!timings)
> -		goto out;
> +		return -EINVAL;
>  
>  	ret = -ENOMEM;
>  	info->modes = kmalloc_array(timings->num_timings,
> 

Thanks, queued for v4.9.

 Tomi



Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ