All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Kees Cook <keescook@chromium.org>, linux-kernel@vger.kernel.org
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] fbdev: omap2: remove potential format string leak
Date: Fri, 12 Jun 2015 09:38:05 +0000	[thread overview]
Message-ID: <557AA87D.2020504@ti.com> (raw)
In-Reply-To: <20150608223053.GA28939@www.outflux.net>

[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]



On 09/06/15 01:30, Kees Cook wrote:
> Since kobject_init_and_add takes a format string, make sure that the
> passed in name cannot be accidentally parsed.
> 
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
>  drivers/video/fbdev/omap2/dss/display-sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/omap2/dss/display-sysfs.c b/drivers/video/fbdev/omap2/dss/display-sysfs.c
> index 12186557a9d4..6ad0991f8259 100644
> --- a/drivers/video/fbdev/omap2/dss/display-sysfs.c
> +++ b/drivers/video/fbdev/omap2/dss/display-sysfs.c
> @@ -324,7 +324,7 @@ int display_init_sysfs(struct platform_device *pdev)
>  
>  	for_each_dss_dev(dssdev) {
>  		r = kobject_init_and_add(&dssdev->kobj, &display_ktype,
> -			&pdev->dev.kobj, dssdev->alias);
> +			&pdev->dev.kobj, "%s", dssdev->alias);
>  		if (r) {
>  			DSSERR("failed to create sysfs files\n");
>  			omap_dss_put_device(dssdev);
> 

Thanks, queued for 4.2.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Kees Cook <keescook@chromium.org>, linux-kernel@vger.kernel.org
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] fbdev: omap2: remove potential format string leak
Date: Fri, 12 Jun 2015 12:38:05 +0300	[thread overview]
Message-ID: <557AA87D.2020504@ti.com> (raw)
In-Reply-To: <20150608223053.GA28939@www.outflux.net>

[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]



On 09/06/15 01:30, Kees Cook wrote:
> Since kobject_init_and_add takes a format string, make sure that the
> passed in name cannot be accidentally parsed.
> 
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
>  drivers/video/fbdev/omap2/dss/display-sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/omap2/dss/display-sysfs.c b/drivers/video/fbdev/omap2/dss/display-sysfs.c
> index 12186557a9d4..6ad0991f8259 100644
> --- a/drivers/video/fbdev/omap2/dss/display-sysfs.c
> +++ b/drivers/video/fbdev/omap2/dss/display-sysfs.c
> @@ -324,7 +324,7 @@ int display_init_sysfs(struct platform_device *pdev)
>  
>  	for_each_dss_dev(dssdev) {
>  		r = kobject_init_and_add(&dssdev->kobj, &display_ktype,
> -			&pdev->dev.kobj, dssdev->alias);
> +			&pdev->dev.kobj, "%s", dssdev->alias);
>  		if (r) {
>  			DSSERR("failed to create sysfs files\n");
>  			omap_dss_put_device(dssdev);
> 

Thanks, queued for 4.2.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Kees Cook <keescook@chromium.org>, <linux-kernel@vger.kernel.org>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	<linux-omap@vger.kernel.org>, <linux-fbdev@vger.kernel.org>
Subject: Re: [PATCH] fbdev: omap2: remove potential format string leak
Date: Fri, 12 Jun 2015 12:38:05 +0300	[thread overview]
Message-ID: <557AA87D.2020504@ti.com> (raw)
In-Reply-To: <20150608223053.GA28939@www.outflux.net>

[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]



On 09/06/15 01:30, Kees Cook wrote:
> Since kobject_init_and_add takes a format string, make sure that the
> passed in name cannot be accidentally parsed.
> 
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
>  drivers/video/fbdev/omap2/dss/display-sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/omap2/dss/display-sysfs.c b/drivers/video/fbdev/omap2/dss/display-sysfs.c
> index 12186557a9d4..6ad0991f8259 100644
> --- a/drivers/video/fbdev/omap2/dss/display-sysfs.c
> +++ b/drivers/video/fbdev/omap2/dss/display-sysfs.c
> @@ -324,7 +324,7 @@ int display_init_sysfs(struct platform_device *pdev)
>  
>  	for_each_dss_dev(dssdev) {
>  		r = kobject_init_and_add(&dssdev->kobj, &display_ktype,
> -			&pdev->dev.kobj, dssdev->alias);
> +			&pdev->dev.kobj, "%s", dssdev->alias);
>  		if (r) {
>  			DSSERR("failed to create sysfs files\n");
>  			omap_dss_put_device(dssdev);
> 

Thanks, queued for 4.2.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-06-12  9:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-08 22:30 [PATCH] fbdev: omap2: remove potential format string leak Kees Cook
2015-06-08 22:30 ` Kees Cook
2015-06-12  9:38 ` Tomi Valkeinen [this message]
2015-06-12  9:38   ` Tomi Valkeinen
2015-06-12  9:38   ` Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=557AA87D.2020504@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=keescook@chromium.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=plagnioj@jcrosoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.