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: <20130107160137.dec5098a.akpm@linux-foundation.org>
Date:	Mon, 7 Jan 2013 16:01:37 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Jingoo Han <jg1.han@...sung.com>
Cc:	"'LKML'" <linux-kernel@...r.kernel.org>,
	linux-fbdev@...r.kernel.org,
	"'Richard Purdie'" <rpurdie@...ys.net>,
	"'Devendra Naga'" <devendra.aaru@...il.com>
Subject: Re: [PATCH] backlight: check null deference of name when device is
 registered

On Fri, 04 Jan 2013 17:29:11 +0900
Jingoo Han <jg1.han@...sung.com> wrote:

> NULL deference of name is checked when device is registered.
> If the name is null, it will cause a kernel oops in dev_set_name().
> 
> ...
>
> --- a/drivers/video/backlight/backlight.c
> +++ b/drivers/video/backlight/backlight.c
> @@ -292,6 +292,11 @@ struct backlight_device *backlight_device_register(const char *name,
>  	struct backlight_device *new_bd;
>  	int rc;
>  
> +	if (name == NULL) {
> +		pr_err("backlight name is null\n");
> +		return ERR_PTR(-EINVAL);
> +	}
> +
>  	pr_debug("backlight_device_register: name=%s\n", name);

I don't understand this.

Is there some driver which is calling these functions with name=NULL? 
If so, which one(s)?

If "no" then why don't we declare that "passing name=NULL is a bug" and
leave the code as-is?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ